everyone. I am learning C++ and running basic "Hello, world!" codes.
I am using NetBeans with the minGW compiler.
The problem is every time I build or attempt to run the project, I get an error:
BUILD FAILED (exit value 2, total time: 38s)
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/MinGW-Windows
0 [main] mkdir 5908 open_stackdumpfile: Dumping stack trace to mkdir.exe.stackdump
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 5
make.exe[2]: Leaving directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 38s)
What's odd is that I could keep clicking run, and sometimes the project will build and run successfully. Other times it will not...as if it's broken. It's actually not running at all now due to the error, however.
Apparently this is a common problem, yet I haven't been able to successfully use the solutions I've found.
I have the latest version of NetBeans as I've heard that this was a bug. v7.4
I believe I have the proper path in my environment variable: C:\MinGW\msys\1.0\bin\; C:\MinGW\bin
If it helps, this is my code:
#include <iostream>
#include <string>
using namespace std;
int main(){
string Question = "What is your name?\n";
cout << Question;
string Answer;
getline(cin, Answer + " : " + Answer);
cout << Answer + "\n";
}