(Installing C and C++ compilers for Netbeans IDE for Windows )
Since Netbeans is the most reliable development platform for every programmer. It is very convenient for students. Since it includes inbuilt support for most of the programming languages such as JAVA, C, C++, Ruby, PHP, Groovy , JAVA ME, JAVA EE and JAVA FX etc. Netbeans is the free IDE developed by Sun Microsystems. It is available for Windows, Linux and Solaris etc. You can download it from http://www.netbeans.org. Before installing Netbeans it needs JDK(Java Development Kit). Then you have to install Netbeans.
For Linux no need to configure anything. For using Netbeans for C and C++ in Windows, we have top configure compilers and debuggers in Windows OS. For that we need to install four tools i.e. GCC, G++, GDB and MAKE utility. These tools can be configured through the installation of CYGWIN tool.
CYGWIN Installation Procedure:
- Download CYGWIN from http://www.cygwin.com/setup.exe.
- It will be of 512 KB file. Double click on it to start installation.
- The window appears. Then Click Next.
- You will be shown three options i.e. Install From Internet, Download Without Installing and Install From Local Directory. One thing to note here is that CYGWIN comes with around 600MB(not exact) of installation files. If you don’t have those files with you, then you have two options i.e. “Install From Internet” which will download those files and install cygwin. Or you can select second option i.e. “Download Without Installing” which will download those files and then they can be used to install Cygwin using third option i.e. “Install From Local Directory”. Second option is most preferable because once we download all those files, we can save them in separate drive and use them for installing CYGWIN another time without the need to download them again.
- Select third option i.e. “ Install From Local Directory”. Click Next.
- In this Window, enter the directory path where you want to install Windows. I have selected C:\ cygwin. It is better to select C:\cygwin.
- In the next window, it locates the source package for installation.Click Next.
- Here comes the important step. Here there are lot of packages available to install.
- You need to select 4 tools namely Development (DEVEL), SHELLS, EDITORS and UTILITIES.
- To install DEVEL, you have to click on that. Then you will see the “DEFAULT” option infront of that. You need to click on “DEFAULT”, then it shows “INSTALL” option. It means that you have selected it for installation.
- If you again click on that, you will see “REINSTALL” option. Which is not needed.
- Similarly you select other three i.e. SHELLS, EDITORS and UTILITIES for installation.
- Then click Next. You will get window named “Resolving Dependencies”. In this window it shows the list of packages ready to be installed.
- Click on Next. It will start installation and process takes about 10-15 minutes. And you are done installing CYGWIN.
- But its not over. There is one more step. You need to add cygwin path to Netbeans, so that it uses those compilers.
- For this, open Netbeans and click on Tools-> Options.
- In options, click on C/C++ tab. There at left side, you can see the “Tools Collection” box.
- Below click on “ADD” button to add CYGWIN directory path.
- You will see a window, in which you have to specify the CYGWIN directory path.
- Since I have installed CYGWIN in C:\Progarm Files\ cygwin.
- So I will add the path as C:\Progarm Files\ cygwin\bin.
- Click on OK. Now you can run any C or C++ program.
Note: Now also if you are not able to execute your C/C++ programs properly, then select “INSTALL” option for all the packages shown in step 9.