这是我做的... #tar -xzvf libnet-0.10.11.tar.gz #cd libnet
然后我将linux.mak文件复制到父目录下的port.mak文件中。 然后,如文档所述,我在当前目录中使用了 make...
naman@naman-laptop:~/Desktop/Software/libnet$ make
make -C lib/ lib
make[1]: Entering directory `/home/naman/Desktop/Software/libnet/lib'
gcc -O2 -Wall -Werror -Wno-unused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -I../include -Iinclude -DTARGET_LINUX -c -o core/config.o core/config.c
cc1: warnings being treated as errors
core/config.c: In function ‘__libnet_internal__seek_section’:
core/config.c:87: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
core/config.c: In function ‘__libnet_internal__get_setting’:
core/config.c:111: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
make[1]: *** [core/config.o] Error 1
make[1]: Leaving directory `/home/naman/Desktop/Software/libnet/lib'
make: *** [lib] Error 2
谁能详细解释一下这个错误,以及如何纠正它?任何帮助将非常感激。
最佳答案
https://github.com/sam-github/libnet ,那是一个古老的libnet版本,现代的使用autoconf,你需要使用这么旧的吗?
我建议从您正在使用的 makefile 中删除 -Wall
和 -Werror
。
关于ubuntu - 在 Ubuntu-9.10 上安装 libnet-0.10.11 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4813007/