![]() |
undefined reference to `lzo1z_decompress'
Hello,
I am trying to decompress a data buffer through LZO decompression algorithm. But it throws an error while building the code. "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf gmake[1]: Entering directory `/root/NetBeansProjects/Projects/CFNORawServer' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cfnorawserver gmake[2]: Entering directory `/root/NetBeansProjects/Projects/CFNORawServer' gmake[2]: Warning: File `Include/lzoconf.h' has modification time 3.7e+04 s in the future mkdir -p build/Debug/GNU-Linux-x86 rm -f build/Debug/GNU-Linux-x86/main.o.d gcc -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.c mkdir -p dist/Debug/GNU-Linux-x86 gcc -o dist/Debug/GNU-Linux-x86/cfnorawserver build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/main.o: In function `main': /root/NetBeansProjects/Projects/CFNORawServer/main.c:127: undefined reference to `lzo1z_decompress' collect2: ld returned 1 exit status gmake[2]: *** [dist/Debug/GNU-Linux-x86/cfnorawserver] Error 1 gmake[2]: Leaving directory `/root/NetBeansProjects/Projects/CFNORawServer' gmake[1]: *** [.build-conf] Error 2 gmake[1]: Leaving directory `/root/NetBeansProjects/Projects/CFNORawServer' gmake: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 331ms) MY CODE IS : Code:
memset(recv_str,0,sizeof(recv_str));Hardik. |
Re: undefined reference to `lzo1z_decompress'
You need to add the library that defines lzo1z_decompress to your link line (that's the one starting "gcc -o"). Then the linker will be able to resolve that symbol. At the moment you are trying to build the program from just build/Debug/GNU-Linux-x86/main.o.
|
| All times are GMT +5.5. The time now is 06:05. |