Contributed and maintained by
October 2008 [Revision number: V6.0-2]
In order to build and debug C/C++ executables and libraries on Linux,
a minimal set of development tools must be installed.
These tools are not bundled with the NetBeans C/C++ pack.
This how-to tells how to install supported versions of these tools.
For more information about working with C/C++ applications in the NetBeans IDE, see the C/C++ Applications Learning Trail page on the
NetBeans web site.
Tutorial Requirements
Before you proceed, make sure you review the requirements in this section.
Software Needed for This Tutorial
Before you begin, you need to install NetBeans
IDE 6.5.
The C/C++ installer option includes NetBeans IDE 6.5 and C/C++ support.
If your initial NetBeans download did not include the C/C++ pack, you'll need
to go to the Available Plugins tab on the Tools > Plugins menu and install the C/C++ plugin.
Which Tools to Use?
Linux developers have several choices for development tools:
Most Linux distributions supply GNU development tools as an optional bundle.
Unfortunately, the bundle names vary for each Linux distribution. Most Linux
distributions also have different tools for automatically installing these
bundles.
GNU Development Tools
The GNU development tools (gcc, g++, gmake, and
gdb) are the primary tools for
C/C++ development using the NetBeans IDE. The following list tells how to install
these tools on various Linux distributions. Before running the following commands,
check whether the tools are already installed on your system.
Ubuntu 7.xx
sudo apt-get install gcc g++ gdb make
Red Hat Fedora Core
sudo yum install gcc g++ gdb make
Other Linux Distributions
Other Linux distributions have similar commands for installing optional
software. Check your Linux distribution for how to install these programs.
In most cases these tools need to be installed as root. If not, you
can skip the
sudo portion of the above commands.
Sun Studio 12 Compilers
If you want to use the Sun Studio 12 compilers:
If you
have Sun Studio 12 software installed, ensure that /installation
directory/sunstudio12/bin
is in your path before you start the NetBeans IDE.