How can I create both Windows and Mobile applications on the same development PC?
-
I downloaded the Nokia Qt SDK. This is a one stop download for mobile devices which installs smoothly. However there is no option to allow me to also develop for Windows.
I then downloaded Qt Creator 2.0 for Windows. However
(1) Qt Creator always starts in the original mobile configuration
(2) The Qt Creator 2.0 installation does not appear to include qmake.exe
So how do I develop for both Windows and Mobile applications?
-
The Nokia Qt SDK does not include a desktop Qt version. It is meant for mobile development only. Qt Creator delivered as part of the Nokia Qt SDK can be used to develop Desktop projects, too, but you need to install a desktop Qt version (e.g. by downloading the bare Qt from the nokia website) and register it in creator (Tools->Options->Qt4, just add a new one and point it to the qmake installed by the new Qt version).
Afterwards you should be able to add a Desktop target to your project(s). Just visit the Project Mode and click on the (+) button at the top.
-
Tobias, thanks for the info. Unfortunately it doesn't work for me.
For instance the "Move Blocks" example compiles and runs happily for the Nokia simulator, but fails if I try to compile it for the desktop:
In Tools>Options>Qt4 I created another Qt version (Qt 4.6.3 desktop) which pointed at the qmake.exe from the newly installed desktop Qt. However I don't have MSVC installed, which is probably why in red I see "Unable to detect MSVC version. Nor does it give me a field to enter the MinGW directory
I clicked on "+" in Projects and added the Desktop target
I replaced "Qt in PATH" with Qt 4.6.3 desktop
When I click on Run I get this output:
Running build steps for project moveblocks...
Starting: "C:/NokiaQtSDK/QtCreator/bin/jom.exe" clean
C:\NokiaQtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Debug clean
del debug\main.moc
del debug\main.obj
del debug\moveblocks.intermediate.manifest debug\moveblocks.exp debug\moveblocks.pdb debug\moveblocks.ilk vc*.pdb vc*.idb
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\debug\main.moc
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\debug\main.obj
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\debug\moveblocks.intermediate.manifest
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\vc*.pdb
C:\NokiaQtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Release clean
del release\main.moc
del release\main.obj
del release\moveblocks.intermediate.manifest release\moveblocks.exp
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\release\main.moc
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\release\main.obj
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\release\moveblocks.intermediate.manifest
del ".\moveblocks.intermediate.manifest"
del moveblocks.exp
del moveblocks.pdb
del moveblocks.ilk
del vc*.pdb
del vc*.idbjom 0.9.3 - empower your cores
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\moveblocks.intermediate.manifest
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\moveblocks.exp
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\moveblocks.pdb
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\moveblocks.ilk
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\vc*.pdb
Could Not Find C:\NokiaQtSDK\Examples\4.6\animation\moveblocks\vc*.idb
The process "C:/NokiaQtSDK/QtCreator/bin/jom.exe" exited normally.
Configuration unchanged, skipping qmake step.
Starting: "C:/NokiaQtSDK/QtCreator/bin/jom.exe"
C:\NokiaQtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Debug
C:\NokiaQtSDK\Qt4.6.3\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"........\Qt4.6.3\include\QtCore" -I"........\Qt4.6.3\include\QtGui" -I"........\Qt4.6.3\include" -I"........\Qt4.6.3\include\ActiveQt" -I"debug" -I"........\Qt4.6.3\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 main.cpp -o debug\main.moc
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"........\Qt4.6.3\include\QtCore" -I"........\Qt4.6.3\include\QtGui" -I"........\Qt4.6.3\include" -I"........\Qt4.6.3\include\ActiveQt" -I"debug" -I"........\Qt4.6.3\mkspecs\win32-msvc2008" -Fodebug\ @C:\DOCUME~1\joallin\LOCALS~1\Temp\main.obj.4532.1141.jom
'cl' is not recognized as an internal or external command,
operable program or batch file.
command failed with exit code 9009jom 0.9.3 - empower your cores
command failed with exit code 2
The process "C:/NokiaQtSDK/QtCreator/bin/jom.exe" exited with code %2.
Error while building project moveblocks (target: Desktop)
When executing build step 'Make' -
You did download the MSVC version of Qt (or so it seems), so you need a MSVC setup too. Mingw will not work with a MSVC library (which is why creator will not let you enter a mingw path).
Sorry, forgot to mention this rather important step, assuming you had a windows development environment set up on a machine meant to develop software on (even if it was mobile software).
-
Success!
For anyone else who is similarly intellectually challenged:
- The Qt download is from http://qt.nokia.com/downloads. The required downloads are hidden behind the LGPL tab, so click on this tab or you won't find them (took me ages ;o( )
- If you already have a Visual Studio installation then you can download "Qt libraries 4.6.3 for Windows (VS 2008, 194 MB)"
- Or if like me you don't, and also want a minimal implementation, download "Qt libraries 4.6.3 for Windows (minGW 4.4, 280 MB)"
- Other instructions as above