Netbeans 7.4 C++简单的 hello world 错误构建失败尝试了 Google 搜索结果前 2 页上的

Netbeans 7.4 C++ simple hello world error build failed tried everything on the first 2 pages of google search results

本文关键字:搜索结果 Google 构建 C++ 简单 hello Netbeans 错误 world 失败      更新时间:2023-10-16
    "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
    make[1]: Entering directory '/cygdrive/c/Users/Great Albino/Documents       /NetBeansProjects/Tutorial 1'
    cygwin warning:
  MS-DOS style path detected: build/Debug/Cygwin_4.x-Windows/Tutorial.d
  Preferred POSIX equivalent is: build/Debug/Cygwin_4.x-Windows/Tutorial/.d
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/tutorial_1.exe
make[2]: Entering directory '/cygdrive/c/Users/Great Albino/Documents/NetBeansProjects/Tutorial 1'
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f build/Debug/Cygwin_4.x-Windows/Tutorial 1.o.d
g++    -c -g -MMD -MP -MF build/Debug/Cygwin_4.x-Windows/Tutorial 1.o.d -o build/Debug/Cygwin_4.x-Windows/Tutorial 1.o Tutorial 1.cpp
g++: error: 1.o.d: No such file or directory
nbproject/Makefile-Debug.mk:68: recipe for target 'build/Debug/Cygwin_4.x-Windows/Tutorial 1.o' failed
make[2]: *** [build/Debug/Cygwin_4.x-Windows/Tutorial 1.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Great Albino/Documents/NetBeansProjects/Tutorial 1'
nbproject/Makefile-Debug.mk:60: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Great Albino/Documents/NetBeansProjects/Tutorial 1'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 330ms)
#include <iostream>
int main()
{
std::cout << "Hello World!";
return 0;
}
and 
#include <iostream>
int main()
{
cout << "Hello World!";
return 0;
}

尝试两种方式

我把文件改成了tutorial_1

这里有一些绒毛,因为我有太多的代码。 这里有一些绒毛,因为我有太多的代码。 这里有一些绒毛,因为我有太多的代码。 这里有一些绒毛,因为我有太多的代码。 这里有一些绒毛,因为我有太多

的代码。 这里有一些绒毛,因为我有太多的代码

我在cygwin中添加了GCC,G ++,AS,Make,GDB。

我正在运行窗口 7。

您似乎有一个类似于"教程 1.cpp"的文件名。 即带有嵌入式空格。 NetBeans 可能支持它,但它可能会使构建脚本无休止地混淆。

我真的应该避免在文件名中使用空格。