在 Linux 中从命令行(又名 bash 脚本)以调试模式构建 Qt 项目
我已经有一个带有 .pro 文件的项目,可以在调试和发布模式下构建。所以我的问题是,如果我想使用调试信息构建二进制文件,我必须指定命令行上的选项是什么。以下是使用 bash 脚本在发布版本中构建的示例:
cd ${CHECKOUT_DIR_DEV_OGL_DX_ENGINE_SKIA};
echo `date`: "Running \`qmake\` on Skia";
qmake&>${SKIA_LOG};
buildstatus $? "Running \`qmake\` on Skia";
echo `date`: "Running \`make\` on Skia";
make&>${SKIA_LOG};
buildstatus $? "Running \`make\` on Skia Please see ${SKIA_LOG}";
我需要添加什么才能现在也以调试模式构建?
I already have a project with a .pro file that can be built in debug and release mode. So my question is what is the options on the commandline that I have to specify if I want to build my binaries with debug information. Here is an example building in release using a bash script:
cd ${CHECKOUT_DIR_DEV_OGL_DX_ENGINE_SKIA};
echo `date`: "Running \`qmake\` on Skia";
qmake&>${SKIA_LOG};
buildstatus $? "Running \`qmake\` on Skia";
echo `date`: "Running \`make\` on Skia";
make&>${SKIA_LOG};
buildstatus $? "Running \`make\` on Skia Please see ${SKIA_LOG}";
What do I need to add to get it now to also build in debug mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要的选项是“CONFIG+=debug”。请参阅 常规配置 http://doc.qt.io/qt-5/qmake-manual.html" rel="noreferrer">qmake 手册。
The option you need is "CONFIG+=debug". See General Configuration in qmake Manual.