linux - 发出 "make"命令时发生错误

标签 linux makefile ubuntu-14.04 omnet++

在输入“make”命令时遇到错误

make MODE=release

make[1]: Entering directory '/home/deepak/omnetpp-4.2.2'

***** Configuration: MODE=release, TOOLCHAIN_NAME=gcc, LIB_SUFFIX=.so ****

===== Checking environment =====

mkdir -p /home/deepak/omnetpp-4.2.2/bin

===== Compiling utils ====

cd /home/deepak/omnetpp-4.2.2/src/utils && make

make[2]: Entering directory '/home/deepak/omnetpp-4.2.2/src/utils'

g++ abspath.cc -o /home/deepak/omnetpp-4.2.2/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

   return std::string(getcwd(wd,1024)) + "/" + pathname; //XXX results in double slash if wd is the root

                                   ^

Makefile:59: recipe for target '/home/deepak/omnetpp-4.2.2/out/gcc-release/src/utils/abspath' failed

make[2]: *** [/home/deepak/omnetpp-4.2.2/out/gcc-release/src/utils/abspath] Error 1

make[2]: Leaving directory '/home/deepak/omnetpp-4.2.2/src/utils'

Makefile:96: recipe for target 'utils' failed

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

make[1]: Leaving directory '/home/deepak/omnetpp-4.2.2'

Makefile:19: recipe for target 'allmodes' failed

make: *** [allmodes] Error 2

是什么导致了这个失败?

最佳答案

出现此错误是因为om-net++版本与对应的Ubuntu版本不兼容, 从以下链接下载最新版本的 om-net++

http://omnetpp.org/omnetpp/category/30-omnet-releases

然后解压即可享用。 :)

关于linux - 发出 "make"命令时发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29147484/

相关文章:

c - 为什么 linux 内核使用非标准 C 编码(gcc 特定功能)?

makefile - 构建具有多个目标的多个文件

dependencies - libstdc++6-armhf-cross 出现未满足的依赖项错误。如何解决?

python - linux/wine/python-os 参数忽略错误

virtualenv - Ubuntu 14.04 升级破坏了我所有的 virtualenvs

linux - 定位命令未检测到 32 位库

linux - 修改menuconfig中的内核版本信息

c++ - G++ 命令行使用线程标记,linux makefile 不使用

c++ - Live555 RTSP服务器不使用UDP

c++ - 如何修改Makefile以支持交叉编译?