Ubuntu12.10编译openwrt遇到的错误

由于Openwrt有很多工具是要先编译的,在Ubuntu12.10平台下编译openwrt时就遇到了下面这样的错误:
elf.cpp: In static member function 'static Elf::file* Elf::file::open(const char*)':
elf.cpp:68:5: error: '::close' has not been declared
后经google,发现很多网友也遇到这样的问题,因此借鉴了他们的方法。

1、找到elf.cpp源文件(./build_dir/host/mklibs/src/mklibs-readelf/elf.cpp),打开.
2、在包含的头文件最后添加一行#include <unistd.h>
3、保存,重新编译,问题解决。

posted on 2013-09-05 22:17  swblog  阅读(982)  评论(0编辑  收藏  举报

导航