“选项”窗口:C/C++
另请参见
通过“选项”窗口的 "C/C++" 面板,可以为 C 和 C++ 项目配置生成工具、项目设置、代码帮助设置、格式设置样式、语义突出显示设置以及接受的文件扩展名。可以通过选择“工具”>“选项”,然后单击 "C/C++" 类别来访问此面板。
“生成工具”标签
-
The Development Host 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. 有关使用远程主机的信息,请参见远程开发。
-
要添加远程主机,请单击“编辑”。在“开发主机管理器”对话框中,单击“添加”。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.
-
要删除远程主机,请单击“编辑”。在“开发主机管理器”对话框中,选择要删除的主机,单击“删除”,然后单击“确定”。
-
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 rsync to use the rsync utility to copy files to the remote host, or scp to use the secure copy command to copy the files. The files are copied to your .netbeans directory by default. This can be changed with the Path Mapper.
-
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.
-
要将集合添加到列表中,请单击“添加”,然后在“添加新工具集”对话框中指定基目录。将自动填写“工具集系列”和“工具集名称”。您可以为集合指定不同的名称。如果更改系列,请确保您指定的系列是该集合的正确系列,否则编译器标志可能无效。
-
要从列表中删除集合,请选择该集合,然后单击“删除”。
-
要复制集合,请从列表中选择该集合,然后在对话框中修改基目录、工具集系列或工具集名称。
-
要将集合设置为缺省集合,请选择该集合,然后单击“缺省”。
-
基目录。当前开发主机的编译器的基目录。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 编译器。生成项目时使用的 C 编译器。缺省编译器为在基目录中找到的第一个编译器。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++ 编译器。生成项目时使用的 C++ 编译器。缺省编译器为在基目录中找到的第一个编译器。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 编译器。用于生成项目的 Fortran 编译器。缺省编译器为在基目录中找到的第一个编译器。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 命令。用于生成项目的 make 命令。缺省命令为在基目录中找到的第一个命令。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.
-
调试器命令。调试项目时使用的 gdb 命令。缺省命令为在基目录中找到的第一个命令。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.
“项目选项”标签
-
Make 选项。make 命令的全局选项。
-
文件路径模式。存储项目中文件路径的模式。Always Relative mode stores paths as relative to the project root. “始终绝对路径”模式表示将路径存储为绝对路径。Auto mode stores paths as relative to the project root if inside the project, otherwise as absolute path.
-
运行 Make 命令前保存所有修改的文件。如果选中此属性,将在运行 make 命令之前保存 IDE 中所有未保存的文件。建议将此属性保留为选中状态,因为 make 无法识别 IDE 中的文件修改,除非已将这些修改保存到硬盘上。
-
重用完成进程中的输出标签。如果选中此属性,则会将 make 输出写入单独的“输出”窗口标签中,且删除上一个进程的输出。如果未选中此属性,则会为每个 make 进程打开一个新标签。
-
在生成的 makefile 中启用依赖关系检查。在 makefile 中添加 make state 语句。
-
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.
“代码帮助”标签
选择适当的编译器标签。修改内置解析器使用的包含文件和宏定义的设置。
“格式化样式”标签
从“语言”下拉列表中选择语言,并从“样式名称”列表中选择样式。修改样式属性设置。
“语义突出显示”标签
-
标记位于插入记号下的符号实例。如果选择此选项,则当您单击某个类、函数、变量或宏时,将突出显示该类、函数、变量或宏在当前文件中的所有实例。
-
保留标记。如果选中此选项,已突出显示的类、函数、变量和宏将保持突出显示。
-
突出显示非活动代码。如果选择此选项,则会突出显示非活动代码。
-
突出显示类字段。如果选择此选项,则会突出显示类字段。
-
突出显示函数名称。如果选择此选项,则会突出显示函数名称。
-
突出显示宏。如果选中此选项,将突出显示宏。
-
突出显示类型定义。如果选择此选项,则会突出显示类型定义。
“其他”标签
编辑包含接受的 C 源文件、C++ 源文件以及 C 和 C++ 头文件的文件扩展名的列表。
法律声明