Please nominate your Qt Champions for 2021!

VS2012 .vcxproj file not working as accepted

  • I have been trying to track down this linker error for a whole now that is titled "VS2012 & mismatch detected for ‘_MSC_VER’":

    Well, I do generate the project file from a .pro and .pri file, so I thought I would try compiling it via jom and it links just fine, no issues. I regenerated the .vcxproj file and tried a clean build but I keep getting the same error, well there are two errors actually. The first error I get is this:

    1>LINK : fatal error LNK1117: syntax error in option 'manifest:embed'

    I am able to get around that one by going into Properties --> Manifest Tools --> Input and Output and setting Embed Manifest to No. But I still get the mismatch detected for _MSC_VER. Here is my pro and pri file:

    @TARGET = SalesCenter
    QT += xml sql gui core script svg network printsupport widgets
    CONFIG += debug_and_release
    QTPLUGIN += qjpeg
    INCLUDEPATH += ./../../../include ./GeneratedFiles ../../3rdPartyLibraries/NCReport/src/ncreport ../../3rdPartyLibraries/NCReport/src/ncreport ../../3rdPartyLibraries/NCReport/src/preview .
    LIBS += -L../../3rdPartyLibraries/NCReport/lib -L./../../../lib -lLicenseLibMD
    UI_DIR += ./GeneratedFiles
    RCC_DIR += ./GeneratedFiles

    CONFIG(debug, debug|release) {
    DESTDIR = ../Debug
    LIBS += -L../Debug -lncreportd
    OBJECTS_DIR += Debug
    MOC_DIR += ./GeneratedFiles/Debug
    INCLUDEPATH += ./GeneratedFiles/Debug
    } else {
    DESTDIR = ../Release
    LIBS += -L../Release -lncreport
    OBJECTS_DIR += Release
    MOC_DIR += ./GeneratedFiles/Release
    INCLUDEPATH += ./GeneratedFiles/Release

    win32:RC_FILE = SalesCenter.rc

    RESOURCES += ncreport/preview.qrc


    @HEADERS += ./aboutform.h
    SOURCES += ./aboutform.cpp
    FORMS += ./aboutform.ui
    RESOURCES += ncreport/preview.qrc

  • Moderators

    And you're 100% sure that your Qt is also built with msvc2012 AND the according MKSPEC?!

  • I am 100% sure I am using VS2012, not so much on following the spec, considering I didn't know there was a speck to follow. Might you provide a link to more details?

  • Moderators

    what i meant was if Qt was configured with configure ... -platform "win32-msvc2012"
    (assuming you use Qt5)

    Also you could try to link against a already "compiled package":

Log in to reply