使用MinGW和netbeans 7.3.1运行错误

时间:2013-09-21 21:23:42

标签: c++ mingw netbeans-7

我安装了MinGW,我正在使用netbeans。但是,当我尝试运行一个简单的“Hello world”程序时,它会给我以下错误:

"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-     conf
make.exe[1]: Entering directory `/c/Users/Notandi/Documents/NetBeansProjects/somegame'
"/C/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_1-   Windows/somegame.exe
make.exe[2]: Entering directory `/c/Users/Notandi/Documents/NetBeansProjects/somegame'
mkdir -p dist/Debug/MinGW_1-Windows
g++     -o dist/Debug/MinGW_1-Windows/somegame build/Debug/MinGW_1-Windows/main.o -   lmingw32 -lSDL2main -lSDL2.dll
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot open output    file dist/Debug/MinGW_1-Windows/somegame.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW_1-Windows/somegame.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Notandi/Documents/NetBeansProjects/somegame'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Notandi/Documents/NetBeansProjects/somegame'
make.exe": *** [.build-impl] Error 2


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

我检查过程序是否在后台运行,但事实并非如此。 即时通讯使用Windows 64位和使用MinGW for c ++。

1 个答案:

答案 0 :(得分:0)

我只是将NetBeans配置为使用MinGW并面临同样的不便,但很快就会这么做 决定使用NetBeans“以管理员身份运行”,这有助于(因此甚至在进一步的运行中不需要“以管理员身份运行”)。在下周我可以用另一种方式重新安装MinGW + MSYS。我在引用:

  

如果在有限的用户帐户下安装MSYS,则稍后尝试构建和运行项目时,NetBeans IDE可能会出现问题