tags:

views:

417

answers:

0
LNK1112: module machine type ' X86' conflicts with target machine type 'THUMB'

I'm trying to build Qt for Windows CE/Windows Mobile and I'm following this guide: http://doc.qt.nokia.com/4.6/install-wince.html

These are the steps I took so far:

  1. I downloaded qt-everywhere-opensource-src-4.6.3
  2. Extracted to C:\Qt\qt-everywhere-opensource-src-4.6.3
  3. Opened a Visual Studio command prompt and ran the following command configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -webkit -openssl -arch windowsce -opensource -qt-gif -qt-libjpeg -qt-libpng
  4. The configure step finished successfully.
  5. I try to setcepaths wincewm60professional-msvc2008 and I get the following error

Could not find specified SDK: Windows Mobile 6 Professional SDK (ARMV4I)

'tmp_created_script_setup.bat' is not recognized as an internal or external command, operable 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 is set up

This is probably my problem as if I type in checksdk -list I get this output

Available SDKs:
SDK Name: Pocket PC 2003 (ARMV4)
SDK Name: Smartphone 2003 (ARMV4)

For some reason, the Windows Mobile Professional 6.5 SDK is not detected, even though I can create, build and run Windows Mobile Professional 6.5 applications from Visual Studio 2008.

Nevertheless, the setcepaths command is supposed to set some environment variables to override the default Visual Studio include paths and include their Windows Mobile counterparts, so I went ahead, following the guide and set them myself to

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 that in place, I try running nmake and then I'm struck with 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.

I'm stumped guys.