Netbeans

Configuring C, C++ In NetBeans 6.5

1. In Linux and Solaris NetBeans 6.5 configures itself using the gcc/g++ compiler which is present in several flavors of Linux, to run C/C++ programs. 2. 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. 3. To achieve this, we use Cygwin – Cygwin is a Linux like environment for Windows. It contains several popular tools like gcc, g++, gmake, gdb, etc. 4. Cygwin can be downloaded and installed from http://www.cygwin.com/. 5. Once the setup file is downloaded from the above mentioned site, it can be run as a normal .exe file.

6. Cygwin supports three installation types a. Online installation b. Downloading the installation files without actual installation c. Offline installation form a local directory

7. Mention the directory path for the installation files.

8. Mention the directory where the downloaded files were placed. Offline install requires the packages to be downloaded and stored as a directory.

9. 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.

10. Select the required packages to be installed and proceed.

11. After some time, the installation completes.

12. 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.

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

Similar Essays