I am trying to make a simple "Hello World!" in NetBeans IDE 7.3 with MinGW as my C ++ compiler.
I'm having build failures and I donβt understand why.
This is my compiler setup:
- Family: MinGW
- Base directory: C: \ MinGW
- C Compiler: C: \ MinGW \ bin \ gcc.exe
- C ++ compiler: C: \ MinGW \ bin \ g ++. exe
- Assembler: C: \ MinGW \ bin \ as.exe
- Make the command: C: \ MinGW \ msys \ 1.0 \ bin \ make.exe
- Debugger Command: C: \ MinGW \ bin \ gdb.exe
I made sure that my PATH environment points to C: \ MinGW \ bin and C: \ MinGW \ msys \ 1.0 \ bin .
My code is:
#include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; }
After trying to create a project, I get this message from NetBeans debug output:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory `/c/NetBeansProjects/HelloWorld' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/helloworld.exe make[2]: Entering directory `/c/NetBeansProjects/HelloWorld' mkdir -p build/Debug/MinGW-Windows rm -f build/Debug/MinGW-Windows/main.od g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.od -o build/Debug/MinGW-Windows/main.o main.cpp make[2]: g++: Command not found make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 127 make[2]: Leaving directory `/c/NetBeansProjects/HelloWorld' make[1]: *** [.build-conf] Error 2 make[1]: Leaving directory `/c/NetBeansProjects/HelloWorld' make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 1s)
I am looking for various Q&A, but I seem to be doing everything right.
source share