<div><br></div><div>I seem to run into some trouble.</div><div>I succeeded in building the source code of Xapian in ubuntu,</div><div>but when I write a demo c++ application </div><div><br></div><div><span style="line-height: 1.5;">#include <xapian.h>     </span></div><div><div>#include <iostream></div><div><br></div><div>using namespace std;</div><div><br></div><div>int</div><div>main()</div><div>{</div><div>    Xapian::WritableDatabase db("database", Xapian::DB_CREATE_OR_OPEN);</div><div>    return 0;</div><div><span style="line-height: 1.5;">}</span></div></div><div><span style="line-height: 1.5;"><br></span></div><div>I can't get it built.</div><div><br></div><div><div>hurricanetong@hurricanetong-VirtualBox:~/workspace$ g++ -L/usr/local/lib -lxapian-1.3 BuildIndexDemo.cpp</div><div>/tmp/cc7JwYty.o: In function `main':</div><div>BuildIndexDemo.cpp:(.text+0x52): undefined reference to `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)'</div><div>BuildIndexDemo.cpp:(.text+0x7b): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'</div><div>BuildIndexDemo.cpp:(.text+0xa0): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'</div></div><div><br></div><div>In /usr/local/lib, there are libxapian-1.3.so, libxapian-1.3.a, libxapian-1.3.so.3, libxapian-1.3.so.3.0.0</div><div><br></div><div>I also set LD_LIBRARY_PATH=/usr/local/lib</div><div><br></div><div>in /etc/ld.so.conf.d, there are also /usr/local/lib</div><div><br></div><div>I also restart my machine, but I still can't make it. </div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;">HurricaneTong,<div>Second Year Undergraduate,</div><div>School of Computer Science,</div><div>Fudan University, China.</div></div></div><div> </div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "James Aylett";<james-xapian@tartarus.org>;</div><div><b>Date: </b> Wed, Feb 12, 2014 08:18 PM</div><div><b>To: </b> "Xapian Development"<xapian-devel@lists.xapian.org>; <wbr></div><div><b>Cc: </b> "Hurricane Tong"<zhangshangtong.cpp@qq.com>; <wbr></div><div><b>Subject: </b> Re: [Xapian-devel] A beginner in "Posting list encoding improvements"</div></div><div><br></div>On 12 Feb 2014, at 08:55, Olly Betts <olly@survex.com> wrote:<br><br>> For GSoC projects, I'd recommend developing on Linux, or another<br>> Unix-like platform.  I think everyone who has so far expressed an<br>> interest in mentoring uses Linux or Mac OS X, so we're much better<br>> placed to help with development on such platforms.<br><br><br>If you're on Windows, the way of doing this is to virtualise (either VirtualBox, which is free, or VMWare, which isn't but you can sometimes find prepackaged VMs which work with their free version). I'd recommend using a recent Ubuntu (13.04 or 13.10) for preference, although 12.04 (which is the Long Term Support version) shouldn't present too many pain points.<br><br>If you need help, I can probably be of assistance. Keeping track of which commands you type (eg by using script(1)) is a good idea if you're unfamiliar with linux and think you might run into problems.<br><br>J<br><br>-- <br> James Aylett, occasional trouble-maker<br> xapian.org<br><br>.<br></div>