C ++ Netbeans无法编译

时间:2014-01-14 05:32:54

标签: c++ windows netbeans

我目前正在使用Netbeans 7.4,MinGw并且在第一次编译时遇到了问题。 它说,每当我尝试编译时,mkdir就会停止响应,然后出现以下调试日志。

"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf

make.exe[1]: Entering directory `/d/NetBeans/Welcome_1'

"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows

/welcome_1.exe

make.exe[2]: Entering directory `/d/NetBeans/Welcome_1'

mkdir -p build/Debug/MinGW-Windows

0 [main] mkdir 3296 open_stackdumpfile: Dumping stack trace to mkdir.exe.stackdump

make.exe[2]: *** [build/Debug/MinGW-Windows/welcome.o] Error 5

make.exe[2]: Leaving directory `/d/NetBeans/Welcome_1'

make.exe[1]: *** [.build-conf] Error 2

make.exe[1]: Leaving directory `/d/NetBeans/Welcome_1'

make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 3s)

下面是我的编译器路径。 enter image description here

请帮忙。

将命令路径更改为C:\ msys \ 1.0 \ bin \ make.exe并遇到以下错误。

"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf

make.exe[1]: Entering directory `/c/NetBeans/Welcome_2'

"/C/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows

/welcome_2.exe

make.exe[2]: Entering directory `/c/NetBeans/Welcome_2'

mkdir -p build/Debug/MinGW-Windows

rm -f "build/Debug/MinGW-Windows/welcome.o.d"

g++    -c -g -MMD -MP -MF "build/Debug/MinGW-Windows/welcome.o.d" -o build/Debug/MinGW-

Windows/welcome.o welcome.cc

In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cwchar:44:0,

from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\postypes.h:40,

from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iosfwd:40,

from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:38,

from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,

from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,

from welcome.cc:31:


c:\mingw\include\wchar.h:37:20: fatal error: stddef.h: No such file or directory

  #include <stddef.h>
                    ^

compilation terminated.

make.exe[2]: *** [build/Debug/MinGW-Windows/welcome.o] Error 1

make.exe[2]: Leaving directory `/c/NetBeans/Welcome_2'

make.exe[1]: *** [.build-conf] Error 2

make.exe[1]: Leaving directory `/c/NetBeans/Welcome_2'

make: *** [.build-impl] Error 2



BUILD FAILED (exit value 2, total time: 955ms)

2 个答案:

答案 0 :(得分:2)

我通过安装更多MinGw软件包来解决这个问题。下载时一定错过了一些包。我也尝试在环境变量中重新修改我的路径。感谢很多帮助!

答案 1 :(得分:0)

我有相同的错误并使用mingw的基本设置安装。需要安装哪些附加软件包,因为mingw有很长的软件包列表。