Building Qt for Windows Mobile
-
Hello!
I am having a strange problem building Qt on Windows Vista for Windows Mobile 6.x professional targets.
I have the following environment:
Windows Vista 64-bit
Visual Studio 2008 SP1
Qt 4.7.3 for Windows (http://qt.nokia.com/downloads/windows-cpp-vs2008)
Qt Plug-in for Visual StudioI follow the instructions from here:
http://www.qtcentre.org/wiki/index.php?title=Building_Qt_on_Windows_CE
I configure the build:
C:\Qt\4.7.3-mobile>c:\Qt\4.7.3\configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -no-qt3support -no-webkit -no-phonon -no-phonon-backend -opensource -debug-and-release -qt-sql-sqlite
The configuration runs fine.
Then I execute setcepaths wincewm60professional-msvc2008 which also completes without any errors.
However, when I run nmake it gives me the following errors:
c:\Qt\4.7.3\src\corelib\io\qtextstream.cpp(3398) : fatal error C1083: Cannot open include file: 'qtextstream.moc': No such file or directory
c:\Qt\4.7.3\src\corelib\io\qfilesystemwatcher.cpp( 642) : fatal error C1083: Cannot open include file: 'qfilesystemwatcher.moc': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\ce\bin\x86_arm\cl.EXE"' : return code '0x2'
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.My path does include c:\Qt\4.7.3\bin and c:\Qt\4.7.3-mobile\bin
Do you have any idea what may be going wrong and how to fix it?
Thanks. It would be really great if I can build Qt programs for Windows Mobile.
-
Yes, I am using VS command prompt.
The file in question is located in C:\Qt\4.7.3\src\corelib\tmp\moc\debug_shared folder. I am not sure why the build process cannot find it.
May be the problem is with the configuration. I am reluctant to start modifying the makefile by hand since it is huge, machine-generated, and I am not sure what I'll break if I do that.
Have you successfully build Qt to compile for Windows CE/Mobile? What were your configuration settings?
Thanks.
-
Here is the configure.cache content of my last build:
@
-platform
win32-msvc2005
-xplatform
wince50standard-armv4i-msvc2005
-D
QT_NO_CURSOR
-stl
@and this is my qmake.cache
@
QMAKE_QT_VERSION_OVERRIDE = 4
OBJECTS_DIR = tmp\obj\debug_shared
MOC_DIR = tmp\moc\debug_shared
RCC_DIR = tmp\rcc\debug_shared
DEFINES += QT_NO_CURSOR
sql-plugins += sqlite
styles += windows windowsce windowsmobile
CONFIG += minimal-config small-config medium-config large-config full-config build_all debug cross_compile incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build
QT_BUILD_PARTS = libs tools examples demos docs translations
QMAKESPEC = C:\Qt\4.7.3_WinCE\mkspecs\wince50standard-armv4i-msvc2005
ARCH = windowsce
QT_BUILD_TREE = C:\Qt\4.7.3_WinCE
QT_SOURCE_TREE = C:\Qt\4.7.3_WinCE
QMAKE_MOC = $$QT_BUILD_TREE\bin\moc.exe
QMAKE_UIC = $$QT_BUILD_TREE\bin\uic.exe
QMAKE_UIC3 = $$QT_BUILD_TREE\bin\uic3.exe
QMAKE_RCC = $$QT_BUILD_TREE\bin\rcc.exe
QMAKE_DUMPCPP = $$QT_BUILD_TREE\bin\dumpcpp.exe
QMAKE_INCDIR_QT = $$QT_BUILD_TREE\include
QMAKE_LIBDIR_QT = $$QT_BUILD_TREE\lib
@Here is a part of the setcepaths.bat
@
) ELSE IF "%1" EQU "wince50standard-armv4i-msvc2005" (
checksdk.exe -sdk "STANDARDSDK_500 (ARMV4I)" -script tmp_created_script_setup.bat 1>NUL
tmp_created_script_setup.bat
del tmp_created_script_setup.bat
echo Standard SDK for arm selected, environment is set up
) ELSE IF "%1" EQU "wince50standard-mipsii-msvc2005" (
checksdk.exe -sdk "STANDARDSDK_500 (MIPSII)" -script tmp_created_script_setup.bat 1>NUL
tmp_created_script_setup.bat
del tmp_created_script_setup.bat
echo Standard SDK for mips-ii selected, environment is set up
) ELSE IF "%1" EQU "wince50standard-mipsiv-msvc2005" (
@All probably not of much help :-(
Maybe you should make a fresh start with configure??
-
Just FYI, I have successfully built Qt 4.7.2 using the wincewm60professional-msvc2008 mkspec. Only problem I had was I had to exclude the examples (using -nomake examples), because the paths became too long. But that does not seem to be the problem you are running into. Have not tried to build 4.7.3 yet.
There's one thing in what you say above that sounds slightly strange though. You point to folder in the source tree - C:\Qt\4.7.3\src\corelib\tmp\moc\debug_shared - which really should be in the build tree. Are you trying to use your Windows build tree as source tree for your Windows Mobile build? Might work, but I would use a clean source tree for shadow building. You can do all your builds from the same source tree, but then I think you should do them all as shadow builds - I use this to create 32 bit Windows, 64 bit Windows and Windows Mobile builds from one source tree.
-
Just tried building 4.7.3, and had no problems with that either. And I'm also building on a Windows 7 64 bit machine. My configure.cache contains:
@
-platform
win32-msvc2008
-xplatform
wincewm60professional-msvc2008
-no-qt3support
-debug-and-release
-opensource
-exceptions
-stl
-rtti
-nomake
examples
@ -
I got further in my efforts.
This configuration at least produces no compile errors:
c:\Qt\4.7.3-mobile>c:\Qt\4.7.3\configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -no-qt3support -no-webkit -no-phonon -no-phonon-backend -opensource -release -qt-sql-sqlite -nomake examples -nomake demos
It gets to the point where it is actually linking the library but then it errors-out complaining about SSL-socket symbols.
qabstractsocket.obj : error LNK2019: unresolved external symbol "public: bool __
cdecl QSslSocket::waitForDisconnected(int)" (?waitForDisconnected@QSslSocket@@QA
A_NH@Z) referenced in function "public: bool __cdecl QAbstractSocket::waitForDis
connected(int)" (?waitForDisconnected@QAbstractSocket@@QAA_NH@Z)
....\lib\QtNetwork4.dll : fatal error LNK1120: 31 unresolved externalsIs there a special option I need to specify to make sure that ssl is compiled?
Thanks
-
Thank you ludde,
I am trying again to build Qt for WinMo but still running into the same problems. I tried on three different computers and fail every time.
Are there detailed step-by-step instructions on how to build Qt for Windows Mobile? I tried following this: http://www.qtcentre.org/wiki/index.php?title=Building_Qt_on_Windows_CE but it does not work. Since it is working for you and so many others it must be that I am not configuring it correctly.
Here are my steps:
-
I create folders named c:\Qt\4.7.3-mobile and c:\Qt\4.7.3-mobile\bin
-
Add C:\Qt\4.7.3\bin and C:\Qt\4.7.3-mobile\bin to the PATH environment variable
-
Open Visual Studio 2008 Command Prompt, change to c:\Qt\4.7.3-mobile and execute
c:\Qt\4.7.3-mobile>c:\Qt\4.7.3\configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -no-qt3support -no-webkit -no-phonon -no-phonon-backend -opensource -release -qt-sql-sqlite -nomake examples -nomake demos
I've also tried replicating your options but it would not work either.
-
The configure program runs for a while and creates a folder structure inside c:\Qt\4.7.3-mobile with a bunch of makefiles
-
setcepaths wincewm60professional-msvc2008
-
nmake
The nmake program runs for a while until it fails.
You have mentioned something about a clean source tree for shadow building. What does it mean? It builds WinMo Qt in c:\Qt\4.7.3-mobile using sources from c:\Qt\4.7.3 - where Qt got originally installed. The Qt originally installed is the one for windows (http://qt.nokia.com/downloads/windows-cpp-vs2008). Are you saying that there is a different version of Qt or Qt source code that I need to install? Where do I get that?
Thanks again.
-
-
Hi again,
By "clean source tree" I mean a freshly unpacked "Qt everywhere" source distribution. Seems you are not using a source distribution at all, but a pre-built Windows distribtuion, which is probably why it's not working. You can get the source distribution e.g. from "http://qt.nokia.com/downloads/win-ce-cpp":http://qt.nokia.com/downloads/win-ce-cpp.
Also had a look at the Qt Centre page you refer too, but cannot really comment on that. Seems they are using Visual Studio to build Qt, which I have never attempted.
If you still cannot make it work I have a .bat file I use for building that I could post. Has always worked for me, and saves you some tedious typing. (I don't have it where I am right now, though.)
-
It worked!!!!
Thank you very much!
I have just one tiny issue left. I can't integrate the new Qt build into Visual Studio 2008 when I try to add the version through the Qt/Option menu it complains that: This Qt version is not compatible to your current Visual Studio (Qt builds VS version 0, current version: 1500)
I've searched this forum and the web in general and it seems that it is a VS plug-in issue. People were able to resolve it by upgrading/downgrading their plug-in. I have 1.1.9 and it does not work.
Has anyone here been able to successfully use some version of VS plug-in with win-ce build of 4.7.3? What is the right plug-in version for 4.7.3?
Thanks.
-
The latest VS plugins have problems when trying to recognize the Qt version when you add a new qt build.
AFAIK at least for VS2005 the latest version without those problems is 1.1.7
I discovered it the hard way, I had built 4.7.2 for CE 6.0, added it to a VS project (with 1.1.7 plugin) and everything was fine, later upgraded the VS plugin (keeping the already integrated builds) and everything was fine too, then when I built 4.7.3 for CE 6.0 and tried to integrate it to VS it produced the same error reported by gtSasha.
After uninstalling 1.1.9 and reinstalling 1.1.7 everything worked fine as before.
-
Dear getsasha:
how to fix this issue? i meet same issue when i build qt source code
c:\Qt\4.7.3\src\corelib\io\qtextstream.cpp(3398) : fatal error C1083: Cannot open include file: ‘qtextstream.moc’: No such file or directory.