【问题标题】:Can't debug in QT creator with cmake project无法使用 cmake 项目在 QT 创建器中调试
【发布时间】:2015-09-14 17:07:50
【问题描述】:

我使用 CMake Build 创建了一个新的普通 C++ 项目。 当我设置断点并按下调试按钮时,我收到以下消息:

This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.

Section .debug_info: Not found.
Section .debug_abbrev: Not found.
Section .debug_line: Not found.
Section .debug_str: Not found.
Section .debug_loc: Not found.
Section .debug_range: Not found.
Section .gdb_index: Not found.
Section .note.gnu.build-id: Found.
Section .gnu.hash: Found.
Section .gnu_debuglink: Not found.

【问题讨论】:

    标签: cmake qt-creator


    【解决方案1】:

    您可以将此CMake 参数 添加到您的构建设置:

    -DCMAKE_BUILD_TYPE=Debug
    

    【讨论】:

    • 在哪里可以找到这个?
    • 添加了一个屏幕截图以便澄清。
    • 这似乎不起作用,即使使用此设置它仍然是发布类型
    • 在 QtCreator 3.5 中,CMake 参数仅在重建 CMake 生成的 makefile 时可用 - 它是一个单独的弹出窗口,而不是 Build Settings 下的表单。
    猜你喜欢
    • 1970-01-01
    • 2012-04-13
    • 1970-01-01
    • 2016-06-19
    • 1970-01-01
    • 2020-12-06
    • 1970-01-01
    • 2017-11-07
    • 1970-01-01
    相关资源
    最近更新 更多