corner imagecorner image
FeaturesPluginsDocs & SupportCommunityPartners

Installing C/C++ Development Tools on the Solaris OS

Content on this page applies to NetBeans IDE 6.0, NetBeans 6.1, and
NetBeans 6.5 In order to build and debug C/C++ executables and libraries on the Solaris Operating System (Solaris OS), 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++ plugin, 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?

Solaris developers have several choices for development tools:

  1. Sun Studio 12 Compilers
  2. GNU Development Tools from the Solaris 10 OS Companion CD
  3. GNU Development Tools from SunFreeware

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/SUNWspro/bin is in your path before you start the NetBeans IDE.
  • If you do not have Sun Studio 12 software installed, you can download it free at http://developers.sun.com/sunstudio/downloads/.

To download and install the Sun Studio 12 compilers:

  1. Create a directory for the downloaded file. You must have write permission for this directory.
  2. Download the file for your platform into the download directory.
  3. Go to the download directory, and uncompress and untar the downloaded file.
    bzcat filename | tar xvf -
                   
  4. Follow the instructions in Chapter 2 of the Sun Studio 12 Quick Installation (English, Japanese, Simplified Chinese) guide to install the C compiler, C++ compiler, and required Solaris patches.

Add the path to the Sun Studio software to your PATH before starting the NetBeans IDE.

GNU Development Tools

The GNU development tools (gcc, g++, gmake, and gdb. Most Solaris 10 OS releases have gcc, g++, and gmake pre-installed in the /usr/sfw/bin directory. Versions of these three programs, as well as gdb, are also available on the Solaris 10 OS Companion CD and install into /opt/sfw/bin. If your system does not have all of these tools, you can either install them from the Solaris 10 OS Companion CD or download them from http://www.sunfreeware.com.

The tools from the Solaris 10 OS Companion CD and http://www.sunfreeware.com are shipped as compressed Solaris packages. To install one of these packages (in this case gdb), type the following:

         bunzip2 SFWgdb.bz2
         pkgadd -d SFWgdb
      

Once the tools are installed, be sure and update your PATH before starting the NetBeans IDE.

top

Bookmark this page

del.icio.us furl simpy slashdot technorati digg