LNK1112: module machine type ' X86' conflicts with target machine type 'THUMB'
I am trying to create Qt for Windows CE / Windows Mobile and I am following this guide: http://doc.qt.io/archives/4.6/install-wince.html
These are the steps that I have done so far:
- I downloaded qt-everywhere-opensource-src-4.6.3
- Extracted in C: \ Qt \ qt-everywhere-opensource-src-4.6.3
- Opened a Visual Studio command prompt and
configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -webkit -openssl -arch windowsce -opensource -qt-gif -qt-libjpeg -qt-libpng following command configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -webkit -openssl -arch windowsce -opensource -qt-gif -qt-libjpeg -qt-libpng - The configuration step completed successfully.
- I try
setcepaths wincewm60professional-msvc2008 and I get the following error
Could not find the specified SDK: Windows Mobile 6 Professional SDK (ARMV4I)
'tmp_created_script_setup.bat' is not recognized as an internal or external command, operating program, or batch file.
Could not find C: \ Qt \ qt-everywhere-opensource-src-4.6.3 \ tmp_created_script_setup.bat
Windows Mobile 6 Professional selected, environment configured
This is probably my problem, as if I type checksdk -list , I get this output
Available SDKs: SDK Name: Pocket PC 2003 (ARMV4) SDK Name: Smartphone 2003 (ARMV4)
For some reason, the SDK for Windows Mobile Professional 6.5 was not found, although I can create, create, and run Windows Mobile Professional 6.5 applications from Visual Studio 2008.
However, the setcepaths command should set some environment variables to override the default paths of Visual Studio and include their copies of Windows Mobile, so I went further, following the manual, and set it myself
set INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\include;C:\Program Files\Windows Mobile 6 SDK\PocketPC\Include\Armv4i set LIB=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\Program Files\Windows Mobile 6 SDK\PocketPC\Lib\Armv4i set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%PATH%
With this I will try to start nmake and then I am amazed by this error
C:\Qt\qt-everywhere-opensource-src-4.6.3>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. cd src\winmain\ && "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\ nmake.exe" -f Makefile Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makef ile.Debug all Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. lib /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /OUT:..\..\lib\qtmaind.lib @C:\Users\AHMED~1.SAB\AppData\Local\Temp\nm6312.tmp Microsoft (R) Library Manager Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. tmp\obj\debug_shared\qtmain_win.obj tmp\obj\debug_shared\qtmain_win.obj : fatal error LNK1112: module machine type ' X86' conflicts with target machine type 'THUMB' NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\ bin\x86_arm\lib.EXE"' : return code '0x458' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.