Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

MSVC2017 compiler "not recognized" inside .pri file.



  • Im trying to do sort of "clean up" of my solution output. My project consists of 3 sub-projects. Im trying to construct build path of the following pattern:
    Operating System > Compiler > Processor
    Architecture > Build Configuration.

    I have created qmake-target-platform.pri inside my root project directory:

    win32 {
        CONFIG += PLATFORM_WIN
        message(PLATFORM_WIN)
        win32-g++ {
            CONFIG += COMPILER_GCC
            message(COMPILER_GCC)
        }
        win32-msvc2017 {
            CONFIG += COMPILER_MSVC2017
            message(COMPILER_MSVC2017)
        }
    }
    
    /* Configuration for linux and mac,  target architecture detection and build*/
    
    

    When switching between debug/release/profile builds with MinGW everything works just fine:

    Project MESSAGE: PLATFORM_WIN
    Project MESSAGE: COMPILER_GCC
    Project MESSAGE: PROCESSOR_x86
    Project MESSAGE: BUILD_RELEASE
    

    But when I change compiler to MSVC, it looks like part related to MSVC compiler detection inside .pri file is "false":

    Project MESSAGE: PLATFORM_WIN
    Project MESSAGE: PROCESSOR_x86
    Project MESSAGE: BUILD_DEBUG
    

    Can anybody help me out? Im not that much into messing with compilers, so I don't really have an idea what's going on.

    For my project im using Desktop Qt 5.14.2 MinGW 32-bit and Desktop Qt 5.14.2 MSVC2017 32bit


  • Lifetime Qt Champion

    Hi,

    AFAIR, the selector is win32-msvc.


  • Lifetime Qt Champion

    Hi,

    AFAIR, the selector is win32-msvc.



  • Hi,
    Works as intended, thank you. Is there any qt doc where I can find all of those listed for future needs?


  • Lifetime Qt Champion

    AFAIR, they match the mkspecs that you can find in your Qt installation.


Log in to reply