您的位置:首页 > 其它

error: ‘PATH_MAX’ undeclared (first use in this function)

2016-07-08 09:37 393 查看
Ubuntu下 make menuconfig使用必须安装一个库

apt-get install libncurses5-dev

否则提示错误。

>> Unable to find the Ncurseslibraries. 

>> 

>> You must install ncurses-devel inorder 

>> to use 'make menuconfig' 

make[2]: *** [scripts/lxdialog/ncurses] 错误1 

make[1]: *** [menuconfig] 错误 2 

make: *** [menuconfig] 错误 2 


Ubuntu 11.10环境下,编译PowerPC系统内核出错

内核2.6.19交叉编译问题,描述如下:

scripts/mod/sumversion.c: In function‘get_src_version’: 

scripts/mod/sumversion.c:384: error: ‘PATH_MAX’ undeclared (firstuse 

in this function) 

scripts/mod/sumversion.c:384: error: (Each undeclared identifieris 

reported only once 

scripts/mod/sumversion.c:384: error: for each function it appearsin.) 

scripts/mod/sumversion.c:384: warning: unused variable‘filelist’ 

make[3]: *** [scripts/mod/sumversion.o] Error1 

make[2]: *** [scripts/mod] Error 2 

make[1]: *** [scripts] Error 2 

make[1]: Leaving directory`/home/nios2/uClinux-dist/linux-2.6.x' 

make: *** [linux] Error 1


 

解决方法:

# vi scripts/mod/sumversion.c

头文件包含中查看是否有limits.h,若没有,包含进去即可

#inlcude
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: