使用 MinGW 和 netbeans 7.3.1 运行错误

run error using MinGW with netbeans 7.3.1

本文关键字:运行 错误 MinGW netbeans 使用      更新时间:2023-10-16

我安装了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)

我已经检查了程序是否在后台运行,但事实并非如此。im使用Windows 64bit并使用MinGW进行C ++。

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

如果 MSYS 安装在受限用户帐户下,则在以后尝试生成和运行项目时,NetBeans IDE 可能会出现问题