2012-12-08 66 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> 

保存並重新編譯。問題解決了。