【问题标题】:Disable a compiler-warning project-wide in Qt Creator (when using MSVC)在 Qt Creator 中禁用编译器警告项目范围(使用 MSVC 时)
【发布时间】:2013-08-26 23:11:44
【问题描述】:

我想禁用特定警告,例如 C++ warning C4018: '<' : signed/unsigned mismatch,但要在项目范围内禁用。我需要在我的 .pro 文件中添加什么才能达到这种效果?

【问题讨论】:

    标签: c++ qt visual-c++ warnings qt-creator


    【解决方案1】:

    将以下行添加到您的 PRO 文件中:

    QMAKE_CXXFLAGS += /wd4996
    

    【讨论】:

    • @DenysRogovchenko 你是什么意思?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-05-26
    • 2018-06-22
    • 2018-06-22
    • 1970-01-01
    • 2011-09-20
    • 2023-02-02
    • 2014-12-10
    相关资源
    最近更新 更多