Options Window: C/C++
See Also
You can access this panel by choosing Tools > Options and clicking the C/C++ category.
The C/C++ panel of the Options window lets you configure build tools, project settings, code
assistance settings, highlighting settings, and accepted file extensions for your C and C++
projects. These options are used as default values for new C and C++ projects. Some of these
settings can be overridden on individual projects by setting project
properties.
Build Tools tab
Development Host. The list includes your local host and any remote hosts you have
defined. You can add and remove remote development hosts, change the default host, and
specify how to share project sources on the local host with the remote host. For information
on using remote hosts, see Remote Development.
-
To add a remote host, click Edit. In the Development Host Manager dialog box, click Add.
The New Remote Development Host wizard starts. See the help for the New Remote
Development Host wizard for more information.
-
To set a host as the default development host, click Edit. In the Development Host Manager
dialog box, select the host, click Set as Default, then click OK. This host is used by
default for new projects.
-
To remove a remote host, click Edit. In the Development Host Manager dialog box, select the
host you want to remove, click Remove, then click OK.
-
To map shared project sources on the local host to a remote host, click Edit. In the
Development Host Manager dialog box, click Path Mapper. In the Edit Path's Map dialog box,
select the remote host in the Host list. For each mapping, in the Local Path field, type
the path used to access the shared project sources from the local host. In the Remote Path
field, type the path used to access the shared project sources from the remote host.
-
To change IDE properties related to the remote development host, click Properties. In the
Host Properties dialog box, you can change the name displayed in the IDE for the host by
typing in the 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 accessible from the local host and remote host, select File System
Sharing. If sharing the files is not possible, select Smart Secure Copy to copy the files.
The files are copied to your .netbeans directory on the remote host.
Tool Collection. The tool collection list displays the collections found on the
currently selected development host. The default collection for that selected host is listed
in bold type. You can modify the tool collection list by adding or removing collections. Be
sure to select the Development Host before you modify any information about the tool
collection.
-
To add a collection to the list, click Add and specify the base directory in the Add New
Tool Set dialog box. The base directory is usually a bin subdirectory. The Tool
Set Family and Tool Set Name are filled in automatically by the IDE after it analyzes the
tools in the base directory. 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.
-
To make a collection the default, select the collection and click Default. The default
collection is used by default for new projects.
Base Directory. The base directory for compilers for the current development host.
The path can be edited for the local host or remote hosts, but browsing to select a different
path only works on the local host.
C Compiler. The C compiler command to use for building projects. The default compiler
is the first one found in the base directory. You can type a different path to a compiler, or
click the browse button to navigate to a different compiler on the local host.
C++ Compiler. The C++ compiler command to use for building projects. The default
compiler is the first one found in the base directory. You can type a different path to a
compiler, or click the browse button to navigate to a different compiler on the local host.
Fortran Compiler. The Fortran compiler command to use for building projects. The
default compiler is the first one found in the base directory. You can type a different path
to a compiler, or click the browse button to navigate to a different compiler on the local
host.
Assembler. The assembler utility to use to translate assembly language projects into
machine code. The default assembler, if any, is the first one found in the base directory.
You can type a different path to a compiler, or click the browse button to navigate to a
different assembler on the local host.
Make Command. The make command to use for building projects. The default command is
the first one found in the base directory. You can type a different path to a make command,
or click the browse button and navigate to a different command on the local host.
Debugger Command. The gdb command to use when debugging projects. The default command
is the first one found in the base directory. You can type a different path to a gdb command,
or click the browse button and navigate to a different command on the local host.
QMake Command. The path to the qmake command, which is used to generate makefiles for
Qt projects. You can type the path to a qmake command, or click the browse button and
navigate to a different command on the local host.
CMake Command. The path to the cmake command to use for projects with existing
sources that use the CMake cross compiler. You can type a path to the cmake command, or click
the browse button and navigate to a different command on the local host.
The Versions... button displays the version numbers of each tool in the selected Tool
Collection.
The Restore Defaults button can be used to make the IDE search your environment for
tool collections and update the paths to all the tools.
Project Options Tab
-
Make Options. Global options for the make command.
-
File Path Mode. The mode for storing file paths in a project. Always Relative mode
stores paths as relative to the project root. Always Absolute mode stores paths as absolute
paths. Auto mode stores paths as relative to the project root if inside the project,
otherwise as absolute path.
-
Save All Modified Files Before Running Make. If selected, saves all unsaved files in
the IDE before running make. It is recommended to leave this property selected because
modifications to files in the IDE are not recognized by make unless they are first saved to
disk.
-
Reuse Output Tabs from Finished Processes. If selected, writes make output to a
single Output window tab, deleting the output from the previous process. If not selected,
opens a new tab for each make process.
-
Enable dependency checking in generated makefiles. Add make state
statements to the makefile.
-
Show binary files in Projects view. If selected, the Projects view shows all files
in a directory tree, including binary objects. This option is most relevant to projects
created with existing sources, which might place sources and binaries in the same location.
Deselect this option to more easily see your C/C++ source files and header files.
-
Show profiler indicators during run (new projects only). If selected, profiler tools
such as CPU Usage and Memory Usage are set up to run by default when newly created projects
are run. The tools that are shown are determined by the Profile Configuration selected in
Tools > Profiler Tools.
-
Show warning dialog about missing makefiles due to mismatched platforms. If
selected, the IDE will warn you if you attempt to run a project that was created on a
platform that is not the same as your current development host's platform.
- Support indexing of non C/C++/Fortran files in projects (slows down parsing)
If selected, the IDE indexes project files that are not C, C++, or Fortran source files.
By default, this option is not selected to speed up parsing.
-
Rebuild entire project if project properties have changed. If selected,
the IDE rebuilds the project if you change any project properties, even ones
that should have no effect on build products. By default, this is not selected
because dependency checking should ensure most required
rebuilds. You might want to enable this option if you are using GNU tools
and changing compiler or linker options does not cause a rebuild.
Code Assistance Tab
Select the appropriate tool collection and compiler tab. Modify the settings for include
files and macro definitions that are used by the built-in parser. For tool collections on
remote development hosts, the include files are located in your .netbeans directory
Highlighting Tab
Select the elements that should be visually marked in the IDE editor.
-
Mark Occurrences of Symbol Under Caret. If this option is selected, then when you
click on a class, function, variable, or macro, all occurrences of that class, function,
variable, or macro in the current file are highlighted.
-
Keep Marks. If this option is selected, highlighted classes, functions, variable,
and macros remain highlighted.
-
Highlight Inactive Code. If this option selected, inactive code is highlighted.
-
Highlight Class' Fields. If this option selected, class fields are highlighted.
-
Highlight Function's Names. If this option selected, function names are highlighted.
-
Highlight Macros. If this option selected, macros are highlighted.
-
Highlight Typedefs. If this option is selected, typedefs are highlighted.
-
Highlight Unused Variables. If this option is selected, unused variables are
highlighted.
-
Highlight Syntax Errors. If this option is selected, syntax errors are highlighted.
-
Highlight Unresolved Include Files. If this option is selected, include files that
cannot be resolved are highlighted.
-
Highlight Unresolved Identifiers. If this option is seielcted, unresolved
identifiers are highlighted.
-
Reparse on File Change. If this option is selected, your project is reparsed
whenever files are modified. Normally this option should be enabled for code assistance to
work correctly. However, if the project is very large, reparsing might cause delays, so you
can deselect this option and reparse manually. Right-click the project and select Code
Assistance > Reparse Project.
-
Show Overridden Annotations. If this option is selected, the IDE shows popup
annotations in the Source Editor when your cursor is on a method that is overridden in some
descendant classes, or if the method overrides some parent method.
Other Tab
Edit the lists of accepted file extensions for for C, C++, Fortran, and Assembler source
files, and C and C++ header files.
Legal Notices