How to compile Qt 4.6.3 for Windows Mobile (Windows CE) under Windows?

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. 
+4
source share
2 answers
  • Download and install the Qt SDK for Open Source C ++ for Windows http://qt.nokia.com/downloads/sdk-windows-cpp
  • Install Visual Studio.
  • Install Visual Studio SP1.
  • Install .Net Compact Framework.
  • If OS is XP or earlier, install Microsoft Active Sync.
  • If Vista or later, install Windows Mobile Device Center.
  • Install the Windows Mobile 6 SDK.
  • Download and extract the Qt C ++ WinCE SDK (e.g. C: \ Qt \ QtWinCE).
  • Download and install Qt C ++ Windows for Visual Studio (e.g. C: \ Qt \ QtVS2008).
  • Install the Qt Visual Studio Add-in inside the Qt WinCE and Qt C ++ Windows folders for the Visual Studio folder.
  • Change the system environment variables:
    • set INCLUDE = C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ ce \ include; C: \ Program Files (x86) \ Windows Mobile 6 SDK \ PocketPC \ Include \ Armv4i;
    • set LIB = C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ ce \ lib \ armv4i; C: \ Program Files (x86) \ Windows Mobile 6 SDK \ PocketPC \ Lib \ Armv4i;
    • set QTDIR = C: \ Qt \ QtWinCE; C: \ Qt \ QtVS2008; C: \ Qt \ 2010.02.1; C: \ Qt \ 2010.02.1 \ qt;
    • set PATH = C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ ce \ bin \ x86_arm;% PATH%;
  • Customization.
  • setcepaths wincewm60professional-msvc2008
  • Nmake
0
source

For what you said, you do not have SDK for WM6.

SDK is here . See Qt for Windows CE requirements referenced in Installing Qt for Windows CE .

  • Please note that SDK 6.0 is not 6.5.
0
source

All Articles