<div><br></div><div>I uninstall xapian1.3 and install xapian-1.2.17</div><div>but i still failed</div><div><br></div><div><div>hurricanetong@hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` demo2.cc</div><div>/tmp/cc2wsfDJ.o: In function `main':</div><div>demo2.cc:(.text+0x4a): undefined reference to `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'</div><div>demo2.cc:(.text+0x73): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'</div><div>demo2.cc:(.text+0x98): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'</div><div>collect2: ld ·µ»Ø 1</div></div><div><br></div><div>and</div><div><br></div><div><div>hurricanetong@hurricanetong-VirtualBox:~/workspace$ xapian-config --cxxflags --libs</div><div>-I/usr/local/include</div><div>-L/usr/local/lib -lxapian</div></div><div><br></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> "Ralf Mattes";<rm@seid-online.de>;</div><div><b>Date: </b> Wed, Feb 12, 2014 11:02 PM</div><div><b>To: </b> "James Aylett"<james-xapian@tartarus.org>; <wbr></div><div><b>Cc: </b> "Hurricane Tong"<zhangshangtong.cpp@qq.com>; "xapian-devel"<xapian-devel@lists.xapian.org>; <wbr></div><div><b>Subject: </b> Re: [Xapian-devel] A beginner in "Posting list encoding improvements"</div></div><div><br></div>On Wed, Feb 12, 2014 at 03:07:30PM +0000, James Aylett wrote:<br>> On 12 Feb 2014, at 14:58, "Hurricane Tong" <zhangshangtong.cpp@qq.com> wrote:<br>> <br>> > hurricanetong@hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cpp<br>> <br>> You want to use xapian-config-1.3 here, not xapian-config (which will be the installed version, not the trunk version you built).<br><br>Oh, dear - unless the OP know _exactly_ what he's doing he should remove the distributions devel package to<br>avoid hard-to-debug problems:<br><br> sudo apt-get purge libxapian-dev<br><br><br>> I've just built trunk (on Mac OS, admittedly), and your code compiled and linked fine, and when run created an empty database as expected.<br><br>The code post4ed works fine on Debian/testing with the distributed devel packages as well.<br><br> Cheers, RalfD<br> <br>.<br></div>