Sunday, August 16, 2009

C++ with netbeans

Few steps should be followed to integrate C++ with netbeans in Windows

1. Download and install MinGW
2. Download and install msys

  • MinGW is the C/C++ compiler
  • Msys is some kind of a unix emulator. After installing it and setting it in the path system variable, you can input unix commands such as mkdir, ls in the dos prompt. This is needed as makefile in C++ needs to access unix commands.

3. In the compile command dialog in netbeans provide the MinGW bin directory for base. Then it will identify C and C++ compilers other than the makefile. You need to provide the makefile.exe in msys/bin as the makefile location.

Then as the K&R said in their famouse C book, "if you have not botched anything, it should work" :-)

No comments: