简体   繁体   English

无法为Linux编译mozlz4

[英]Trouble compiling mozlz4 for linux

I am trying to compile mozlz4 from github and I'm getting the following errors: 我正在尝试从github编译mozlz4,并且出现以下错误:

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. 它需要我已经安装的pkg-config和liblz4-dev。 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. 我还尝试将liblz4.a,liblz4.pc,liblz4.so,liblz4.so.1,liblz4.so.1.7.1,lz4.h,lz4frame.h和lz4hc.h复制到mozlz4所在的目录。 c,mozlz4.h和unmozlz4.c文件的位置也没有成功。

It has been many years since I have tried to compile source code on linux and I'm stumped. 自从我尝试在Linux上编译源代码以来已经有很多年了,我感到很沮丧。 Any help would be greatly appreciated. 任何帮助将不胜感激。 :D :D

https://github.com/pjanouch/mozlz4 Ubuntu 16.04.3 LTS GNU C Compiler version 5.4.0 20160609 https://github.com/pjanouch/mozlz4 Ubuntu 16.04.3 LTS GNU C编译器版本5.4.0 20160609

尝试gcc -o mozlz4 mozlz4.c -llz4编译mozlz4和gcc -o unmozlz4 unmozlz4.c -llz4编译unmozlz4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM