编译期间netbean出错

时间:2013-10-18 23:30:31

标签: c++ c gcc netbeans mingw

我已经安装了msys并且还在系统中添加了bin的路径,但仍然有一些错误。

"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/d/NetBeansProjekty/CppApplication_2'
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_2.exe
make.exe[2]: Entering directory `/d/NetBeansProjekty/CppApplication_2'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
make.exe[2]: g++: Command not found
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127
make.exe[2]: Leaving directory `/d/NetBeansProjekty/CppApplication_2'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/d/NetBeansProjekty/CppApplication_2'
make.exe": *** [.build-impl] Error 2


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

你能告诉我这个问题吗?

现在我添加了mingw路径,但也弹出了新的恐怖

   "/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=
   SUBPROJECTS= .build-conf make.exe[1]: Entering directory
   `/d/NetBeansProjekty/CppApplication_2' "/C/msys/bin/make.exe" -f
   nbproject/Makefile-Debug.mk
   dist/Debug/MinGW-Windows/cppapplication_2.exe make.exe[2]: Entering
   directory `/d/NetBeansProjekty/CppApplication_2' mkdir -p
   dist/Debug/MinGW-Windows g++ -o
   dist/Debug/MinGW-Windows/cppapplication_2
   build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/newmain.o
   build/Debug/MinGW-Windows/newmain.o: In function `main':
   D:\NetBeansProjekty\CppApplication_2/newmain.cpp:5: multiple
   definition of `main'
   build/Debug/MinGW-Windows/main.o:D:\NetBeansProjekty\CppApplication_2/main.cpp:15:
   first defined here collect2.exe: error: ld returned 1 exit status
   make.exe[2]: *** [dist/Debug/MinGW-Windows/cppapplication_2.exe]
   Error 1 make.exe[2]: Leaving directory
   `/d/NetBeansProjekty/CppApplication_2' make.exe[1]: *** [.build-conf]
   Error 2 make.exe[1]: Leaving directory
   `/d/NetBeansProjekty/CppApplication_2' make.exe": *** [.build-impl]
   Error 2

1 个答案:

答案 0 :(得分:0)

我重写了路径并重新启动了程序及其工作。