PDA

View Full Version : Trying to compile Qt for Windows CE



rickrvo
12th January 2011, 17:11
Hi,

After a long time searching through forums and websites... and after various attempts, I Finally compiled a Qt installation for WinCE. Some things that aren't mentioned anywhere that would solve some similar problems posted by other people that I too had to solve...
Mainly, and this is a little help to other people having trouble at "configure -platform...", You have to install Qt libraries for windows VS2008! It didn't work anytime when I was trying with the mingw version.

I installed Windows CE tools - Windows mobile 5.0 sdk.

I installed Perl.

Added to environment variables LIB, INCLUDE and PATH all that I could think of... so they ended up like this:
PATH = C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoo t%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowe rShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Qt\4.7.1-VS\bin;C:\Qt\shadowbuild-mobile\bin;C:\Qt\4.7.1-VS;C:\Qt\2010.05\mingw;C:\Qt\2010.05\mingw\bin;C:\ Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm
LIB = C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\Program Files (x86)\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I
INCLUDE = C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include;C:\Program Files (x86)\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Include\Armv4i

after all that and running the configure form the Qt VS2008 version folder I was able to compile without any errors... now here is my new headache:

...
Qt is now configured for building. To start the build run:setcepaths.bat wincewm
65professional-msvc2008 && nmake.
To reconfigure, run 'nmake confclean' and configure.

c:\Qt\shadow-build-mobile>setcepaths.bat wincewm65professional-msvc2008
'checksdk.exe' is not recognized as an internal or external command,
operable program or batch file.
'tmp_created_script_setup.bat' is not recognized as an internal or external comm
and,
operable program or batch file.
Could Not Find c:\Qt\shadow-build-mobile\tmp_created_script_setup.bat
Windows Mobile 6 Professional selected, environment is set up

////////at this point I don't know if the setcepaths worked... even though I tried diferently as you cann see below

c:\Qt\shadow-build-mobile>cd bin

c:\Qt\shadow-build-mobile\bin>setcepaths.bat wincewm65professional-msvc2008
Could not find specified SDK: Windows Mobile 6 Professional SDK (ARMV4I)
'tmp_created_script_setup.bat' is not recognized as an internal or external comm
and,
operable program or batch file.
Could Not Find c:\Qt\shadow-build-mobile\bin\tmp_created_script_setup.bat
Windows Mobile 6 Professional selected, environment is set up
c:\Qt\shadow-build-mobile\bin>nmake

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

c:\Qt\shadow-build-mobile\bin>cd ..

//////Now I gave up and hoped for for the best...

c:\Qt\shadow-build-mobile>nmake

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

cd src\winmain\ && "C:\Program Files (x86)\Microsoft Visual Studio 9.0\V
C\BIN\nmake.exe" -f Makefile

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f
Makefile.Release

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

lib /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /LTCG /OUT:..\..\lib\qtmain
.lib @C:\Users\HORMON~1.USI\AppData\Local\Temp\nm216B.t mp
Microsoft (R) Library Manager Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

tmp\obj\release_static\qtmain_win.obj
tmp\obj\release_static\qtmain_win.obj : fatal error LNK1112: module machine type
'X86' conflicts with target machine type 'THUMB'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\lib.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

c:\Qt\shadow-build-mobile>


Can someone please enlighten me on this nmake error?

I still haven't figured out why we have to build a Qt installation for winCE and why we cannot download it from anywhere...

Another question... I've noticed that it creates a visual studio project called "projects", but it gives me an error when I open it (probably because I still have to make the nmake work). Now I have plugins that I'll need to compile for my WinCE application too. So, after I get the nmake to compile the damn Qt installation... Where will I put my project sources?

high_flyer
12th January 2011, 17:28
Are you sure this is supposed to work with VS2008?
A year or so back I did the same thing, and as far as I remember, the Qt configuration was not done for VS2008, and was only available for 2005.
I ended up installing VS2005, and that worked.

It could be that in the mean time VS2008 is also supported, but be sure to double check this.

rickrvo
12th January 2011, 17:32
I'm not sure but I haven't read anywhere that it only works with VS2005... besides the Qt 4.7.1 library to download says (VS2008) dunno if it means that works with visual studio 2008.

tmp\obj\release_static\qtmain_win.obj : fatal error LNK1112: module machine type
'X86' conflicts with target machine type 'THUMB'
this error I think that indicates that has something to do with my computer being x64... or does the choice of wincewm65professional interferes with my installed SDK version being 5.0?

high_flyer
13th January 2011, 07:25
I'm not sure but I haven't read anywhere that it only works with VS2005... besides the Qt 4.7.1 library to download says (VS2008) dunno if it means that works with visual studio 2008.
Since it was some time back, you need to check what I say here, but - as far as I remember, the winCE CONFIGURATION did not support VS2008, only 2005.
Read the readme files about installation and configuration.

There is something I don't get:

after all that and running the configure form the Qt VS2008 version folder I was able to compile without any errors... now here is my new headache:

...
Qt is now configured for building. To start the build run:setcepaths.bat wincewm
So you say you have compiled Qt and yet after that your run the build again?

this error I think that indicates that has something to do with my computer being x64...
I don't know about that.
It depends if the Qt cross complication config supports x64 to WinCE.

Maybe some other users who have more experience with cross compiling to WinCE can help you more about this issue.

rickrvo
13th January 2011, 10:43
after all that and running the configure form the Qt VS2008 version folder I was able to compile without any errors...

Sorry, my bad... I successfully ran configure without any errors.

I was following this guide http://www.qtcentre.org/wiki/index.php?title=Building_Qt_on_Windows_CE The error was when I tried to nmake, as you can see on my first post.

I found this saying that VS2008 is supported http://doc.troll.no/master-snapshot/wince-with-qt-introduction.html

I'll wait for someone to light my way then thanks anyway :)

rickrvo
17th January 2011, 15:28
Sorry, my bad... I successfully ran configure without any errors.

I was following this guide http://www.qtcentre.org/wiki/index.php?title=Building_Qt_on_Windows_CE The error was when I tried to nmake, as you can see on my first post.

I found this saying that VS2008 is supported http://doc.troll.no/master-snapshot/wince-with-qt-introduction.html

I'll wait for someone to light my way then thanks anyway :)

Anyone? please help!

rickrvo
20th April 2011, 10:47
...No one?

I've tried this on linux, windows 7 x64 and now with qt 4.71 vs2008 with qt add-in 1.1.7 on windows xp.... always the same error on nmake... when configuring for wince60professional-msvc2008 platform....

rickrvo
20th April 2011, 17:52
I tried every version.. mingw, vs2008 and now for windows ce... the errors above the U1077 are different but they all endup with U1077 error 0x2...

please? anyone got any tips? or this configuration working?