Where in Qt Creator do I pass arguments to a compiler?(在 Qt Creator 中,我在哪里将参数传递给编译器?)
问题描述
在 Qt Creator 中,我在哪里将参数传递给编译器?
这不是那么明显.
Where in Qt Creator do I pass arguments to a compiler?
It isn't really that obvious.
推荐答案
根据您的构建系统,它位于您的 qmake 项目文件(.pro,新项目的标准)或 CMake 文件(CMakeLists.txt,由 KDE 和其他几个项目使用).
Depending on your build system it's either in your qmake project file(.pro, standard for new projects) or in one of the CMake files (CMakeLists.txt, used by KDE and several other projects).
使用 .pro:
QMAKE_CXXFLAGS += -O2
使用 CMake:
set( CMAKE_CXX_FLAGS "-g -Wall")
这篇关于在 Qt Creator 中,我在哪里将参数传递给编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Qt Creator 中,我在哪里将参数传递给编译器?


- OpenGL 对象的 RAII 包装器 2021-01-01
- 将函数的返回值分配给引用 C++? 2022-01-01
- 将 hdc 内容复制到位图 2022-09-04
- 哪个更快:if (bool) 或 if(int)? 2022-01-01
- 从父 CMakeLists.txt 覆盖 CMake 中的默认选项(...)值 2021-01-01
- 使用 __stdcall & 调用 DLLVS2013 中的 GetProcAddress() 2021-01-01
- DoEvents 等效于 C++? 2021-01-01
- GDB 不显示函数名 2022-01-01
- 如何提取 __VA_ARGS__? 2022-01-01
- XML Schema 到 C++ 类 2022-01-01