Ralf Mattes
2014-Feb-12 14:26 UTC
[Xapian-devel] A beginner in "Posting list encoding improvements"
On Wed, Feb 12, 2014 at 10:32:03PM +0800, Hurricane Tong wrote:> I seem to run into some trouble. > I succeeded in building the source code of Xapian in ubuntu, > but when I write a demo c++ application > > [snip] > I can't get it built. > > > hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ -L/usr/local/lib -lxapian-1.3 BuildIndexDemo.cppHmmm, where did you get this invocation from? This should be: g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cpp xapian-config knbow how to link xapian applications (and libxapian-1.3 looks strange).> > 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 > > > I also set LD_LIBRARY_PATH=/usr/local/lib >LD_LIBRARY_PATH and ld.so.conf.d are used by the runtime dynamic linker, _not_ by the compile time linker.> in /etc/ld.so.conf.d, there are also /usr/local/lib > > > I also restart my machine, but I still can't make it.Linux isn't Windows - the only time you need to reboot is after you installed a new kernel. HTH Ralf Mattes> > ------------------ > HurricaneTong,Second Year Undergraduate, > School of Computer Science, > Fudan University, China. > > > > > > > > ------------------ Original ------------------ > From: "James Aylett";<james-xapian at tartarus.org>; > Date: Wed, Feb 12, 2014 08:18 PM > To: "Xapian Development"<xapian-devel at lists.xapian.org>; > Cc: "Hurricane Tong"<zhangshangtong.cpp at qq.com>; > Subject: Re: [Xapian-devel] A beginner in "Posting list encoding improvements" > > > > On 12 Feb 2014, at 08:55, Olly Betts <olly at survex.com> wrote: > > > For GSoC projects, I'd recommend developing on Linux, or another > > Unix-like platform. I think everyone who has so far expressed an > > interest in mentoring uses Linux or Mac OS X, so we're much better > > placed to help with development on such platforms. > > > 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. > > 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. > > J > > -- > James Aylett, occasional trouble-maker > xapian.org > > .> _______________________________________________ > Xapian-devel mailing list > Xapian-devel at lists.xapian.org > http://lists.xapian.org/mailman/listinfo/xapian-devel
Hurricane Tong
2014-Feb-12 14:58 UTC
[Xapian-devel] A beginner in "Posting list encoding improvements"
but hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cpp /tmp/ccQ0iGRc.o: In function `main': BuildIndexDemo.cpp:(.text+0x52): undefined reference to `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)' BuildIndexDemo.cpp:(.text+0x7b): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()' BuildIndexDemo.cpp:(.text+0xa0): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()' ------------------ HurricaneTong,Second Year Undergraduate, School of Computer Science, Fudan University, China. ------------------ Original ------------------ From: "Ralf Mattes";<rm at seid-online.de>; Date: Wed, Feb 12, 2014 10:26 PM To: "Hurricane Tong"<zhangshangtong.cpp at qq.com>; Cc: "xapian-devel"<xapian-devel at lists.xapian.org>; Subject: Re: [Xapian-devel] A beginner in "Posting list encoding improvements" On Wed, Feb 12, 2014 at 10:32:03PM +0800, Hurricane Tong wrote:> I seem to run into some trouble. > I succeeded in building the source code of Xapian in ubuntu, > but when I write a demo c++ application > > [snip] > I can't get it built. > > > hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ -L/usr/local/lib -lxapian-1.3 BuildIndexDemo.cppHmmm, where did you get this invocation from? This should be: g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cpp xapian-config knbow how to link xapian applications (and libxapian-1.3 looks strange).> > 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 > > > I also set LD_LIBRARY_PATH=/usr/local/lib >LD_LIBRARY_PATH and ld.so.conf.d are used by the runtime dynamic linker, _not_ by the compile time linker.> in /etc/ld.so.conf.d, there are also /usr/local/lib > > > I also restart my machine, but I still can't make it.Linux isn't Windows - the only time you need to reboot is after you installed a new kernel. HTH Ralf Mattes> > ------------------ > HurricaneTong,Second Year Undergraduate, > School of Computer Science, > Fudan University, China. > > > > > > > > ------------------ Original ------------------ > From: "James Aylett";<james-xapian at tartarus.org>; > Date: Wed, Feb 12, 2014 08:18 PM > To: "Xapian Development"<xapian-devel at lists.xapian.org>; > Cc: "Hurricane Tong"<zhangshangtong.cpp at qq.com>; > Subject: Re: [Xapian-devel] A beginner in "Posting list encoding improvements" > > > > On 12 Feb 2014, at 08:55, Olly Betts <olly at survex.com> wrote: > > > For GSoC projects, I'd recommend developing on Linux, or another > > Unix-like platform. I think everyone who has so far expressed an > > interest in mentoring uses Linux or Mac OS X, so we're much better > > placed to help with development on such platforms. > > > 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. > > 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. > > J > > -- > James Aylett, occasional trouble-maker > xapian.org > > .> _______________________________________________ > Xapian-devel mailing list > Xapian-devel at lists.xapian.org > http://lists.xapian.org/mailman/listinfo/xapian-devel. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140212/64ab170d/attachment-0001.html>
James Aylett
2014-Feb-12 15:07 UTC
[Xapian-devel] A beginner in "Posting list encoding improvements"
On 12 Feb 2014, at 14:58, "Hurricane Tong" <zhangshangtong.cpp at qq.com> wrote:> hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cppYou want to use xapian-config-1.3 here, not xapian-config (which will be the installed version, not the trunk version you built). 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. J -- James Aylett, occasional trouble-maker xapian.org