Taxes45
Taxes45

Reputation: 477

Netbeans using minGW doesn't reconize system on compile

I am using netbeans with minGW and msys on windows to code C++. The first day that I installed everything, something like system("PAUSE"); would work fine. I go to my computer today which I hadn't turned off, go to the project that I had already and complied coded tried to run it again and it gives me this,

main.cpp: In function 'int main()':
main.cpp:18:19: error: 'system' was not declared in this scope  
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1  
make[2]: Leaving directory /c/Users/Grant/Documents/NetBeansProjects/CppApplication_1'
make[1]: *** [.build-conf] Error 2  
make: *** [.build-impl] Error 2  
make[1]: Leaving directory '/c/Users/Grant/Documents/NetBeansProjects/CppApplication_1'

I can't figure out whats wrong with it and this code is due on Wensday. Please help.

Upvotes: 0

Views: 1019

Answers (1)

Taxes45
Taxes45

Reputation: 477

<cstdlib> is required for netbeans to compile the code.

Upvotes: 2

Related Questions