Where to specify Zielcomputertyp "X64" - LNK1112 Error



  • Hi,

    I'm in progress of reinstalling and updating my QT environment as it didn't want to work anymore with formerly installed MSVC2015 x64 and current Win 10 Pro build.

    My environment contains:
    Windows 10 Pro Build 14393
    Qt Creator 4.4.1 based on 5.9.2
    I worked through some compiler issues yesterday and came to the point, that I'm getting this error message:

    Qt5Widgetsd.lib(Qt5Widgetsd.dll) : fatal error LNK1112: Modul-Computertyp "x64" steht in Konflikt mit dem Zielcomputertyp "X86".
    

    My target is to be able to compile and run my application in 64-bit architecture.
    It looks to me like there is still one small setting to be adjusted, but I can't find the setting in Qt to do so.
    The full linking output is:

    10:02:58: Führe Schritte für Projekt untitled aus...
    10:02:58: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
    10:02:58: Starte "Y:\Mirrow\Qt\Tools\QtCreator\bin\jom.exe" 
    	Y:\Mirrow\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    	link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\untitled.exe @C:\Users\Dirk\AppData\Local\Temp\untitled.exe.4636.16.jom
    Qt5Widgetsd.lib(Qt5Widgetsd.dll) : fatal error LNK1112: Modul-Computertyp "x64" steht in Konflikt mit dem Zielcomputertyp "X86".
    jom: C:\temp\build-untitled-Desktop_Qt_5_9_2_MSVC2015_64bit-Debug\Makefile.Debug [debug\untitled.exe] Error 1112
    jom: C:\temp\build-untitled-Desktop_Qt_5_9_2_MSVC2015_64bit-Debug\Makefile [debug] Error 2
    10:03:02: Der Prozess "Y:\Mirrow\Qt\Tools\QtCreator\bin\jom.exe" wurde mit dem Rückgabewert 2 beendet.
    Fehler beim Erstellen/Deployment des Projekts untitled (Kit: Desktop Qt 5.9.2 MSVC2015 64bit)
    Bei der Ausführung von Schritt "Make"
    10:03:02: Verstrichene Zeit: 00:04.
    

    Qt automatically created the MSVC 2015 Kit but did not assign the compiler properly. So I've finished the kit by choosing the following configuration:

    0_1508058301843_518441b5-850c-497c-9836-3888ceea13b2-grafik.png ![alt text](image url)

    My pro-file looks like this now:

    #-------------------------------------------------
    #
    # Project created by QtCreator 2017-10-14T13:52:00
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = untitled
    TEMPLATE = app
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which has been marked as deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    
    SOURCES += \
            main.cpp \
            mainwindow.cpp
    
    HEADERS += \
            mainwindow.h
    
    FORMS += \
            mainwindow.ui
    
    CONFIG += mobility
    MOBILITY = 
    
    
    win32: LIBS += -L$$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64/' -lshell32
    
    INCLUDEPATH += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64'
    DEPENDPATH += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64'
    
    win32:!win32-g++: PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64/shell32.lib'
    else:win32-g++: PRE_TARGETDEPS += $$PWD/'../../Program Files (x86)/Windows Kits/10/Lib/10.0.15063.0/um/x64/libshell32.a'
    

    I couldn't find the solution how to properly change the target environment to x64 while the Kit has already set everything I can see to x64. Help is highly appreciated. Thanks.

    Dirk


  • Moderators

    @DirkM Did you try to delete the build directory, run qmake and rebuild?



  • This post is deleted!


  • @jsulm
    Just to be sure I cleared the folder, executed qmake and compiled again. Same issue. :-(


  • Lifetime Qt Champion

    Hi,

    Do you also get that with a default project ?



  • @SGaist Yes, I do. Actually I'm just setting up the environment with a default project 'untitled1'.



  • @DirkM
    hi,

    when you configure your Project, make sure, that in "Buid-Umgebung" your path variable contains the
    the windows 10 kit

    eg:
    C:\Program Files (x86)\Windows Kits\10\bin\x86;

    0_1508222354559_path.PNG

    that is not automatically added when you install the msvc debugger

    I ran into the same problem.



  • @J.Hilk Thanks for the hint. I added the path (after checking that it exists on my maschine.), cleared the directory, execute qmake and compile. Unfortunately it didn't work. I also tried the path with exchanging x86 to x64. Do you have any other idea?

    My environment configuration looks like this:

    0_1508268875216_9d35330c-731d-42de-a5af-d1678020e71b-grafik.png
    0_1508268910399_c3661a08-1ba1-44db-ae2b-1cf46b4aeac0-grafik.png
    0_1508268950478_6451224a-e2e6-4e34-8b52-7820842a930e-grafik.png


Log in to reply
 

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