Sunday, January 25, 2009

NetBeans IDE Delivers For C/C++ Development

For more than a couple of years, I haven't done any serious C/C++ development work - until now. After a brief search and test of various compilers, debuggers, make utilities, and editors, I think the NetBeans 6.5 IDE delivers best in a centralized integrated environment. I also considered both the current Microsoft and Borland offerings (they are unnecessarily too huge and cost money - and these two conflict e.g. debugging with DLLs built in Turbo C++ will not work when using the MS version), CodeBlocks, and DevC++ (both are good). When I last tried the NetBeans IDE, C/C++ support was serious lacking and I was gravely disappointed.

This time around, the people at Sun have built a separate NetBeans IDE for C/C++ development. It integrates with Cygwin tools much better than I remember. It can't be easier than this.
After installing the NetBeans IDE, you only need to download the Cygwin installer and install (at a minimum) the following tools from the Devel node: binutils, gcc-core (C compiler), gcc-g++ (C++ compiler), gcc-mingw-core (MingW32 support headers/libs for GCC), gcc-mingw-c++ (MingW32 support headers/libs for C++), gdb (GNU debugger), make (GCC version of the make utility), makedepend (makefile dependency tool), and mingw-runtime.
Finally set the system environment variable "Path" to include the location of the Cygwin binaries (usually %cygwin_install_dir%\bin) and restart the NetBeans IDE. It picks up on the tools it needs, and off you go.
The memory footstamp is minimal, unlike the Java-focused NetBeans IDEs I have tried in the past. It starts up quickly and is quite intuitive and straightforward. Only bit of inconvenience is that even simple programs must be developed as part of a project. Good practice but not necessary to be enforced that way.