Error while building WinRT x64 application with Qt5.5.1
-
Hello,
I've a problem compiling a simple project for WinRT x64.
What have I done so far?
- Installed Qt SDK 5.5.1 with QtCreator 3.4.2 on a Win8.1 x64 machine
- Added WinRT 8.1 x64 with the MaintenanceTool
- Installed MSVC Express 2013 (for the MS compiler)
- Installed Win SDK 8.1 (for the debugger cdb)
- Within QtCreator > Help > Plugins.. > WinRT activated
- Created a new project and tried to build it.
Error: LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
What configuration is wrong that I can't build the project?
I've read somewhere that x64 isn't supported through MSVC Express, but that can't be the problem, because half a year ago I was able to build a project for WinRT x64 with the same machine.
Any help is appreciated.
Kind regards,
PixtarEDIT:
Here some more information about my QtCreator Kit:
Name: Qt 5.5.1 for Windows Runtime 64bit
Device type: Windows Runtime (local)
Device: Windows Runtime local UI
Compiler: Microsoft Visual C++ Compiler 12.0 (x86_amd64)
Debugger: Automatically CDB (.....\x64\cdb.exe)
Qt-Version: Qt 5.5.1 for Windows Runtime x64EDIT2:
Compiling Output:
08:45:33: Starting "C:\Qt550\5.5\winrt_x64\bin\qmake.exe" D:\Sandbox\winRT-App-Test\winRT-App-Test\winRT-App-Test.pro -r -spec winrt-x64-msvc2013 "CONFIG+=debug"WARNING: winrt_manifest_install.path is not defined: install target not created
WARNING: winrt_manifest_install.path is not defined: install target not created08:45:33: The process "C:\Qt550\5.5\winrt_x64\bin\qmake.exe" was normally terminated.
08:45:33: Starte "C:\Qt550\Tools\QtCreator\bin\jom.exe"
C:\Qt550\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
cl -c -nologo -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\winRT-App-Test.pdb -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DX64 -D__X64__ -D__x64__ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I..\winRT-App-Test -I. -IC:\Qt550\5.5\winrt_x64\include -IC:\Qt550\5.5\winrt_x64\include\QtWidgets -IC:\Qt550\5.5\winrt_x64\include\QtGui -IC:\Qt550\5.5\winrt_x64\include\QtANGLE -IC:\Qt550\5.5\winrt_x64\include\QtCore -Idebug -IC:\Qt550\5.5\winrt_x64\mkspecs\winrt-x64-msvc2013 -Fodebug\ @C:\Users\mk1\AppData\Local\Temp\main.obj.5436.0.jom
main.cpp
C:\Qt550\5.5\winrt_x64\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DX64 -D__X64__ -D__x64__ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -D_MSC_VER=1800 -IC:/Qt550/5.5/winrt_x64/mkspecs/winrt-x64-msvc2013 -ID:/Sandbox/winRT-App-Test/winRT-App-Test -IC:/Qt550/5.5/winrt_x64/include -IC:/Qt550/5.5/winrt_x64/include/QtWidgets -IC:/Qt550/5.5/winrt_x64/include/QtGui -IC:/Qt550/5.5/winrt_x64/include/QtANGLE -IC:/Qt550/5.5/winrt_x64/include/QtCore -I. ..\winRT-App-Test\widget.h -o debug\moc_widget.cpp
cl -c -nologo -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\winRT-App-Test.pdb -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DX64 -D__X64__ -D__x64__ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I..\winRT-App-Test -I. -IC:\Qt550\5.5\winrt_x64\include -IC:\Qt550\5.5\winrt_x64\include\QtWidgets -IC:\Qt550\5.5\winrt_x64\include\QtGui -IC:\Qt550\5.5\winrt_x64\include\QtANGLE -IC:\Qt550\5.5\winrt_x64\include\QtCore -Idebug -IC:\Qt550\5.5\winrt_x64\mkspecs\winrt-x64-msvc2013 -Fodebug\ @C:\Users\mk1\AppData\Local\Temp\widget.obj.5436.0.jom
widget.cpp
cl -c -nologo -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\winRT-App-Test.pdb -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQ_BYTE_ORDER=Q_LITTLE_ENDIAN -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DX64 -D__X64__ -D__x64__ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -I..\winRT-App-Test -I. -IC:\Qt550\5.5\winrt_x64\include -IC:\Qt550\5.5\winrt_x64\include\QtWidgets -IC:\Qt550\5.5\winrt_x64\include\QtGui -IC:\Qt550\5.5\winrt_x64\include\QtANGLE -IC:\Qt550\5.5\winrt_x64\include\QtCore -Idebug -IC:\Qt550\5.5\winrt_x64\mkspecs\winrt-x64-msvc2013 -Fodebug\ @C:\Users\mk1\AppData\Local\Temp\moc_widget.obj.5436.141.jom
moc_widget.cpp
link /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER /MACHINE:X64 /DEBUG /SUBSYSTEM:WINDOWS /MANIFEST:NO /OUT:debug\winRT-App-Test.exe @C:\Users\mk1\AppData\Local\Temp\winRT-App-Test.exe.5436.860.jom
debug\main.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'. -
Hello,
maybe it's because there is only a x86 Qt SDK for Windows (no x64) and I'm using the x86 Qt SDK?
But I'm only able to download WinRT package for x86 and not for x64.
Solution would be to compile Qt from source against x64?!?!?
Kind regards,
Pixtar -
My last post was looking into the wrong direction.
MSVC2013 Express doesn't install the amd64 compiler.
The folder ...\Microsoft Visual Studio 12.0\VC\bin\amd64 is missing.Therefore the command "vcvarsall amd64" is moaning: "The specified configuration type is missing. The tools for the configuration might not be installed."
What can I do to get the native x64 compiler/linker from/for MSVS2013 Express?
Kind regards,
Pixtar -
I'm talking to myself :-P
SO ... finally it seems that it solved my problem.
The Qt Kit Option "Compiler: Microsoft Visual C++ Compiler 12.0 (x86_amd64)" should have made me thoughtful why there is "x86" named.
The MSVC2013 Professional Version installes the amd64 folder with its linker. After changing the compiler of the Qt Kit to:
Microsoft Visual C++ Compiler 12.0 (amd64)
I was able to link the project.Nethertheless MSVC2013 is now moaning that it needs a developer license, BUT this another topic because MSVC is trying to sign the app at this point. I've created half a year ago a tutorial for myself to pack, sign, certificate, deploy and install an app manually via console commands.
Hopefully this thread will help other people with the same problem.
Kind regards,
Pixtar