I need help with LZO. I write a programm in C, with Linux (debian) and
I need to use LZO for compress my data.
I install LZO and in my code I add:
#include <lzoconf.h>
#include <lzo1x.h>
and in my 'main':
lzo_init();
The answer, when I compiling is:
gcc MyProgram.c -o MyProgram
/tmp/cc2Lx3eX.o: In function `main':
MyProgram.c:(.text+0x19fc): undefined reference to `__lzo_init2'
collect2: ld returned 1 exit status
Someone can help me?
I thank you in advance,
Zanardi.
You need to link with the lzo library.
It's probably a file called /usr/lib/liblzo.a
In which case change your your command line to
gcc MyProgram.c -o MyProgram -llzo
(so -l followed by the library name without the path,
the 'lib' bit, or the extension.)
Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
You're right, with:
gcc MyProgram.c -o MyProgram -llzo2
It works perfectly ;-)
Thank you ;-)
Zanardi.