apue.h报错问题

下载apue.3e后进入make,提示错误以下:spa

collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'badexit2' failed
make[1]: *** [badexit2] Error 1
make[1]: Leaving directory '/home/pi/Downloads/apue.3e/threads'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 1

须要安装库:code

sudo apt-get install libbsd-dev

而后:blog

cp ./include/apue.h /usr/include/  
cp ./lib/libapue.a /usr/local/lib/cp ./lib/error.c /usr/include

 在apue.h最后加一行代码ip

#include "error.c"
相关文章
相关标签/搜索