I am trying to compile mozlz4 from github and I'm getting the following errors:
mozlz4.c(.text+0x18c): undefined reference to 'LZ4_compressBound'
mozlz4.c(.text+0xlf5): undefined reference to 'LZ4_compressBound'
mozlz4.c(.text+0x206): undefined reference to 'LZ4_compress_default'
It requires pkg-config and liblz4-dev which I have installed. I have tried setting
CPATH, LIBRARY_PATH, & LD_LIBRARY_PATH
to /usr/include
and then to /usr/lib/x86_64-linux-gnu with no success.
I have also tried copying liblz4.a, liblz4.pc, liblz4.so, liblz4.so.1, liblz4.so.1.7.1, lz4.h, lz4frame.h, & lz4hc.h to the directory where the mozlz4.c, mozlz4.h, and unmozlz4.c files are located also with no success.
It has been many years since I have tried to compile source code on linux and I'm stumped. Any help would be greatly appreciated. :D
https://github.com/pjanouch/mozlz4 Ubuntu 16.04.3 LTS GNU C Compiler version 5.4.0 20160609
尝试gcc -o mozlz4 mozlz4.c -llz4
编译mozlz4和gcc -o unmozlz4 unmozlz4.c -llz4
编译unmozlz4
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.