PRF Architecture issue in Windows



  • Hello,
    I have the following in my xxx.prf file:

    # Determine Compiler
    compileTYPE = "Win32"
    message("Architecture is $$QMAKE_HOST.arch")
    win32:contains(QMAKE_TARGET.arch, x86_64) {
      compileTYPE = "Win64"
    }
    export(compileTYPE)
    
    # Print out job description
    message("Creating '$$TARGET' makefile ($$compileTYPE)-($$scTYPE)...")
    

    The problem is that when QtCreator starts up, it parses this determines that the architecture is x86.
    When running QMake over the project, it correctly identifies that architecture as x86_64 so that all my output files are placed correctly.
    HOWEVER. since the original parsing by QtCreator resulted in incorrect architecture, attempting to debug or execute the application from inside of QtCreator fails because its looking in the wrong path, and there is no way to reset this.
    I know that a workaround is to just code as Win64, but I want to know what Qt is looking at on startup that causes it to be wrong.

    Before you even ask:
    Qt versions: 5.9.2 and 5.10
    Windows Versions: Win8.1 (64 bit) Embedded and Win10 (64 bit)
    Compilers: MSVC 12.0 and MSVC 15.0

    Also, I know that the example shown is looking at 2 different variables (QMAKE_HOST and QMAKE_TARGET), this just debugging and the results are the same.
    Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.