2012-12-08 65 views
3

我想安装omnetpp 4.1(无法安装新版本)。总之,运行./configure没有报告任何错误或警告,但是当我运行make我得到如下:未能安装omentpp 4.1

make MODE=release 
make[1]: Entering directory `/home/yotam/omnetpp-4.1' 
***** Configuration: MODE=release, TOOLCHAIN_NAME=gcc, LIB_SUFFIX=.so **** 
===== Checking environment ===== 
mkdir -p /home/yotam/omnetpp-4.1/bin 
===== Compiling utils ==== 
cd /home/yotam/omnetpp-4.1/src/utils && make 
make[2]: Entering directory `/home/yotam/omnetpp-4.1/src/utils' 
g++ abspath.cc -o /home/yotam/omnetpp-4.1/out/gcc-release/src/utils/abspath 
abspath.cc: In function ‘std::string toAbsolutePath(const char*)’: 
abspath.cc:62:38: error: ‘getcwd’ was not declared in this scope 
make[2]: *** [/home/yotam/omnetpp-4.1/out/gcc-release/src/utils/abspath] Error 1 
make[2]: Leaving directory `/home/yotam/omnetpp-4.1/src/utils' 
make[1]: *** [utils] Error 2 
make[1]: Leaving directory `/home/yotam/omnetpp-4.1' 
make: *** [allmodes] Error 2 

我ununtu 12.10运行,如果它很重要。似乎是代码错误,对吧?

有什么建议吗?由于

回答

12

编辑文件src/utils/abspath.cc和手动添加以下内容:

#include <unistd.h> 

保存并重新编译。问题解决了。