Configuring Build Tools for C/C++/Fortran Projects
See Also
The IDE uses the build tools (compilers, debuggers, make utility) that are installed on your
system, or on a remote system that you set up as a remote build host. The IDE looks for
installed compilers debuggers, and make utility on your path. You cannot work with C, C++, or
Fortran projects without these build tools. If the IDE does not find your compilers, you can
configure build tools to show the IDE where to find them.
You can use the Options window to configure build tools for your C/C++/Fortran projects. The
options that you specify are used by default for all new C/C++/Fortran projects.
To configure build tools:
-
Choose Tools > Options.
-
Click C/C++ in the top pane of the window.
-
Click the Build Tools tab.
-
Modify the properties as desired.
You can set the following properties:
-
Build Host. The Build Host list includes your local host and any remote hosts you
have defined. For information on using remote hosts, see Overview of Remote Development. You can add and remove remote
build hosts, change the default host, and change IDE properties of remote build hosts.
-
To add a remote host, click Edit. In the Build Hosts Manager dialog box, click Add. The
New Remote Host Setup wizard starts. See the help for the New Remote Host Setup wizard for more
information.
-
To remove a remote host, click Edit. In the Build Hosts Manager dialog box, select the
host you want to remove, click Remove, then click OK.
-
To set a host as the default build host, select the host from the build Host list and
click Set as Default.
-
To change IDE properties related to a remote build host, click Edit. In the Build Hosts
Manager dialog box, select the host you want to change and click Properties. In the
Host Properties dialog box, you can change the name displayed in the IDE for the host
by typing in the Display Name field. To change the way project files are shared with
the remote host, select the file synchronization method in the Synchronization list. If
the project files are in a shared folder that is accessible from the local host and
remote host, you can select System-level File Sharing. If sharing the files is not
possible, select Automatic Copying to copy the files. The files are copied using SSH
protocols to your .netbeans directory on the remote host by default.
-
Tool Collection. The tool collection list displays the collections found on the
current build host and the local host. The default collection is listed in bold type. This
collection is selected by default for any new project you create. You can change the
default tool collection for a specific project in the project properties. You can manually
add and remove tool collections.
-
To add a collection to the list, click Add and specify the base directory in the Add
New Tool Set dialog box. The Tool Set Family and Tool Set Name are filled in
automatically. You can specify a different name for the collection. If you change the
family, make sure that the family you specify is the correct family for the collection
or the compiler flags might not be valid.
-
To remove a collection from the list, select the collection and click Remove.
-
To duplicate a collection, select the collection from the list and modify the base
directory, tool set family, or tool set name in the dialog box. This might be useful if
you have two releases of the same tool collection. You can edit the path to the base
directory in the duplicate tool collection to specify the path to the other release.
-
To make a collection the default, select the collection and click Default.
-
Base Directory. The base directory for compilers for the current build host. The
base directory is often the bin directory of the tool collection.
-
-
C Compiler. The path to the C compiler to use for building projects. The default
compiler is the first one found in the base directory.
-
C++ Compiler. The path to the C++ compiler to use for building projects. The
default compiler is the first one found in the base directory.
-
Fortran Compiler. The path to the Fortran compiler to use for building projects.
The default compiler is the first one found in the base directory.
-
Assembler. The path to the assembler program to use for translating assembly
instructions.
-
Make Command. The path to the make command to use for building projects. The default
command is the first one found in the base directory. To select a different command from
the base directory or another directory, click the browse button and navigate to a
different command in the Select Tool dialog box.
-
Debugger Command. The path to the gdb command to use when debugging projects. The
default command is the first one found in the base directory. To select a different command
from the base directory or another directory, click the browse button and navigate to a
different command in the Select Tool dialog box.
-
QMake Command. The path to the qmake command, which is used to generate makefiles
for Qt projects.
-
CMake Command. The path to the cmake command to use for projects with existing
sources that use the CMake cross compiler.
To display the versions of all of the selected tools, click Versions.
To restore all of the tool selections to the defaults, click Restore Defaults.
To set the build tools properties for a specific project, right-click the project and choose
Properties.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.