【发布时间】:2017-01-31 04:33:30
【问题描述】:
尝试为我拥有的 C++ 程序创建我的第一个 makefile,但每当我尝试使用命令“nmake -f makefile.exe”在我的 VS2015 开发人员命令提示符下运行我的 makefile 时,我都会收到致命错误:U1077。
all:
g++ proj1.cpp -o proj1
【问题讨论】:
-
如果直接执行命令会发生什么。
g++ proj1.cpp -o proj1。 documentation 表示此代码表示The given command or program called by NMAKE failed and returned the given exit code. -
我知道 g++ 未被识别为内部或外部命令。
-
好的,在 cygwin 上,当我只执行直接命令但不在我的 makefile 中时,它运行良好。