99网
您的当前位置:首页QT5.6.3+vs2017编译可以在xp下运行的程序

QT5.6.3+vs2017编译可以在xp下运行的程序

来源:99网

在pro文件中,添加如下:

win32 {
    QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS,5.01
    QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE,5.01
    DEFINES += _ATL_XP_TARGETING
    QMAKE_CFLAGS += /D_USING_V120_SDK71_
    QMAKE_CXXFLAGS += /D_USING_V120_SDK71_
    LIBS += -L$$quote(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib)
    NCLUDEPATH += $$quote(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include)
    QMAKE_TARGET_OS = xp
}

编译即可

因篇幅问题不能全部显示,请点此查看更多更全内容