添加自定义编译器

要添加未列于首选项>Kits >Compilers 的编译器,或添加远程编译器,请使用Custom 选项。指定编译器和 make 工具所在目录的路径,并设置编译器的首选项。

套件偏好设置中的 "编译器 "选项卡

添加其他编译器:

  1. 选择首选项>Kits >Compilers >Add >Custom
  2. Name 中,输入编译器的名称。
  3. C compiler path 中,输入 C 编译器所在目录的路径。

    Browse ( MacOS 上为Choose ) 的下拉菜单中选择Remote ,以添加远程 Linux 设备或 Docker 中编译器的路径。

  4. C++ compiler path 中,选择Provide manually ,输入 C++ 编译器所在目录的路径。

    选择Remote ,在远程 Linux 设备或 Docker 中添加编译器的路径。

  5. Make path 中,输入 make 工具所在目录的路径。
  6. ABI 中,指定 ABI 版本。
  7. Predefined macros 中,指定编译器默认启用的宏。在单独一行中指定每个宏,格式如下:MACRO[=值]。
  8. Header paths 中,指定编译器检查头文件的目录路径。在单独一行中指定每个路径。
  9. C++11 flags 中,指定在编译器中打开 C++11 支持的标志。
  10. Qt mkspecs 中,指定 mkspecs 所在目录的路径。通常,该路径是相对于 Qt mkspecs 目录指定的。
  11. Error parser 中,选择要使用的错误解析器。您可以在列表中添加自定义输出解析器。选择Custom Parser Settings 查看和编辑它们的首选项。

另请参阅 添加编译器添加 Nim 编译器编译器添加自定义输出解析器

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.