[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help using libhunspell-dev



Hi all

I'm trying to compile a simple program using libhunspell (on Etch) but I seem to be doing something wrong.

1. install library

# aptitude install libhunspell-dev

2. get a sample program (hunstem) from the upstream package

$ apt-get source hunspell
$ mv hunspell-1.1.4/src/tools/hunstem.cxx .

3. edit hunstem.cxx to use the system installed library

change:
#include "hunspell.hxx"
into:
#include <hunspell/hunspell.hxx>

4. try to compile it!

$ g++ -lhunspell -o hunstem hunstem.cxx
/tmp/ccY6DJZg.o: In function `main':
hunstem.cxx:(.text+0x100): undefined reference to `Hunspell::Hunspell(char const*, char const*)' hunstem.cxx:(.text+0x19c): undefined reference to `Hunspell::spell(char const*)' hunstem.cxx:(.text+0x1d6): undefined reference to `Hunspell::stem(char***, char const*)' hunstem.cxx:(.text+0x272): undefined reference to `Hunspell::~Hunspell()'
collect2: ld returned 1 exit status

It finds the right header file (otherwise it would say "hunspell.hxx: No such file or directory" or "Hunspell was not declared in this scope") but then it fails to find the compiled class in the library archive.

What am I missing?


Tobia


Reply to: