Saturday, January 31, 2009

Configuring C, C++ In NetBeans 6.5

In Linux and Solaris NetBeans 6.5 configures itself using the gcc/g++ compiler which is available in several flavors of Linux to run C/C++ programs. However, in Windows, there isn’t any C/C++ compiler pre-installed, so we need to manually install a C/C++ compiler and configure NetBeans 6.5 with the compiler.

To achieve this, we use Cygwin - A Linux like environment for Windows. It contains several popular tools like gcc, g++, gmake, gdb, etc. Cygwin can be downloaded and installed from http://www.cygwin.com/.

Once the setup file is downloaded from the above mentioned site, it can be run as a normal .exe file. Cygwin supports three installation types -

  • Online installation
  • Downloading the installation files without actual installation
  • Offline installation form a local directory

Mention the directory path for the installation files. Also mention the directory where the downloaded files were placed. Offline install requires the packages to be downloaded and stored as a directory.

The installer will collect information from the parse-file and list all the packages that are available for install. In online install, this will list all the packages that are available to be downloaded and installed. Select the required packages to be installed and proceed. After some time, the installation completes.

Once Cygwin is installed, NetBeans automatically recognizes it and configures its C/C++ compilers. However if it does automatically recognize Cygwin, go to Tools > Options. Under the C/C++ tab, set in the parameters by mentioning the path of the base directory (the bin directory of cygwin), C compiler (gcc), C++ compiler (g++), make command and the gdb command.

That’s all; NetBeans is now configured to run your C/C++ programs.

5 comments:

kasin said...

do you know, where i can find the offline one..??

Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

selinitur said...

most likely, you have also heard about the pdf repairing software

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

.Net Training in Chennai | .Net Online Training | Dot Net Training in Chennai

Dot Net Online Training | LINQ Online Training