[Xapian-devel] A beginner in "Posting list encoding improvements"

Hurricane Tong zhangshangtong.cpp at qq.com
Wed Feb 12 14:32:03 GMT 2014

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 

#include <xapian.h>     
#include <iostream>

using namespace std;

    Xapian::WritableDatabase db("database", Xapian::DB_CREATE_OR_OPEN);
    return 0;

I can't get it built.

hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ -L/usr/local/lib -lxapian-1.3 BuildIndexDemo.cpp
/tmp/cc7JwYty.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()'

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

in /etc/ld.so.conf.d, there are also /usr/local/lib

I also restart my machine, but I still can't make it. 

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.


 James Aylett, occasional trouble-maker

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20140212/b6fce639/attachment.html>

More information about the Xapian-devel mailing list