On Microsoft Windows, MAPI header files are required to be installed, we recommend installing Visual Studio Express for this purpose.
So what should we do?
I've posted a question on Forum Nokia here.
Learn mobile applications development with Qt Framework's Mobility API for Nokia's Symbian S60 & MeeGo smartphone platforms.
On Microsoft Windows, MAPI header files are required to be installed, we recommend installing Visual Studio Express for this purpose.
Starting: /usr/bin/make -w
.......
/usr/bin/ld: cannot find -lQtMessaging_tp
collect2: ld returned 1 exit status
make: *** [message-merge] Error 1
Exited with code 2.
Error while building project message-merge
When executing build step 'Make'
|
On Linux QMF is required to be installed and the QMF_INCLUDEDIR and QMF_LIBDIR environment variables set to the messagingframework/src/libraries/qtopiamail and build/messagingframework/image/lib directories respectively.
git clone git://gitorious.org/qt-labs/messagingframework.git qt-messagingframeworkIf you don't have git or don't want to use it, you can also download QMF as tarball archive.
export PATH=/opt/qtsdk-2010.01/qt/bin:$PATH qmake "QMF_INSTALL_ROOT=$PWD/image" qmf.pro make make installNow you need to rebuild Qt Mobility with Messaging (QMF) support (change paths as necessary):
export PATH=/opt/qtsdk-2010.01/qt/bin:$PATH export QMF_INCLUDEDIR=/opt/qt-messagingframework/src/libraries/qtopiamail export QMF_LIBDIR=/opt/qt-messagingframework/image/lib ./configure make make installMake sure it says "Checking QMF ... OK" during configure.
# Qt Mobility export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/qt-mobility-src-1.0.0-tp2/install/lib:/opt/qt-messagingframework/image/lib export QMF_INCLUDEDIR=/opt/qt-messagingframework/src/libraries/qtopiamail export QMF_LIBDIR=/opt/qt-messagingframework/image/libOnce Qt Mobility Messaging + QMF is set, to use it add the following to your .pro project file:
CONFIG += mobility MOBILITY = messagingThe writemessage example additionally uses the following workaround to link QMF library:
symbian|win32 {
} else {
# Temporarily link against local qtopiamail lib (should be part of the platform)
LIBS += -L $$(QMF_LIBDIR) -lqtopiamail
}
Then you should be set.
/usr/bin/ld: warning: libqtopiamail.so.1, needed by /opt/qt-mobility-src-1.0.0-tp2/install/lib/libQtMessaging_tp.so, not found (try using -rpath or -rpath-link)
/opt/qt-mobility-src-1.0.0-tp2/install/lib/libQtMessaging_tp.so: undefined reference to `QMailAccountKey::operator|=(QMailAccountKey const&)'
|
error while loading shared libraries: libqtopiamail.so.1: cannot open shared object file: No such file or directory
exited with code 127
|
chmod +x qt-sdk-linux-x86-opensource-2010.01.bin ./qt-sdk-linux-x86-opensource-2010.01.bin
Apart from a C++ compiler, a number of development libraries need to be present to enable Qt Creator to build your Qt applications. On Debian and Ubuntu, use the following command in a terminal to make sure they are installed:So just do what it tells you to:
sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-devIf you're using QtOpenGL, you'll also need OpenGL development files. You can use the following command to find out which packages to install:
sudo apt-get install libgl-dev libglu-dev
sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-dev sudo apt-get install libgl-dev libglu-devMake sure you add Qt bin folder to your PATH environment. Edit $HOME/.profile and add:
export PATH=/opt/qtsdk-2010.01/qt/bin/:$PATHNow you can build and run Qt applications.
You have used QtCreator with some Qt version before, and now have installed the same Qt version in a different location: There's a bug that in this case the information where to get the help file is not updated.
Please try explicitly removing the entries in Tools -> Options -> Help, and either restart QtCreator, or add the qch-files from your Qt version explicitly.
set PATH=%PATH%;C:\strawberry\perl\bin
cd \qtmobility configureThis will configure Qt Mobility build with default target directory: C:\QtMobility
mingw32-make mingw32-make install
C:\Users\ceefour\Documents\qt-mobility-src-1.0.0-tp2>configure C:\Users\ceefour\Documents\qt-mobility-src-1.0.0-tp2 Checking available Qt 4.6.0 Checking make "Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH" "Aborting."I tried to move it to a top-level folder (C:\qtmobility) but still getting the same error.
C:\qt-mobility-src-1.0.0-tp2>qmake config.tests\make\make.pro Project MESSAGE: symbian-sbsv2 Project MESSAGE: symbian-sbsv2 Project MESSAGE: symbian-sbsv2 C:\qt-mobility-src-1.0.0-tp2>make 'make' is not recognized as an internal or external command, operable program or batch file.So it's looking for make.exe, which doesn't exist on my system.
...
for /f "tokens=3" %%i in ('%QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do set BUILDSYSTEM=%%i
set BUILDSYSTEM=win32-mingw
if %BUILDSYSTEM% == symbian-abld (
...
Update: Use this patch. C:\qt-mobility-src-1.0.0-tp2>configure C:\qt-mobility-src-1.0.0-tp2 Checking available Qt 4.6.0 Checking make hello ... mingw32-make found. Start of compile tests Checking LBT 'Y_MAKEPROJECT_LOG' is not recognized as an internal or external command, operable program or batch file. ... Not Found 'compile' is not recognized as an internal or external command, operable program or batch file. "Generating Mobility Headers..." The system cannot find the file specified. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. 'perl' is not recognized as an internal or external command, operable program or batch file. Running qmake... Reading C:/qt-mobility-src-1.0.0-tp2/src/src.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/global/global.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/serviceframework/serviceframework.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/bearer/bearer.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/location/location.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/contacts/contacts.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/multimedia/multimedia.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/publishsubscribe/publishsubscribe.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/versit/versit.pro Reading C:/qt-mobility-src-1.0.0-tp2/src/systeminfo/systeminfo.pro Reading C:/qt-mobility-src-1.0.0-tp2/tools/tools.pro Reading C:/qt-mobility-src-1.0.0-tp2/tools/servicefw/servicefw.pro Reading C:/qt-mobility-src-1.0.0-tp2/tools/servicexmlgen/servicexmlgen.pro Reading C:/qt-mobility-src-1.0.0-tp2/tools/vsexplorer/vsexplorer.pro Reading C:/qt-mobility-src-1.0.0-tp2/tools/qcrmlgen/qcrmlgen.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/plugins.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/contacts/contacts.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/multimedia/multimedia.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/multimedia/m3u/m3u.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/multimedia/phonon/phonon.pro Reading C:/qt-mobility-src-1.0.0-tp2/plugins/multimedia/audiocapture/audiocapt ure.pro Reading C:/qt-mobility-src-1.0.0-tp2/doc/doc.pro Reading C:/qt-mobility-src-1.0.0-tp2/doc/src/snippets/snippets.pro Reading C:/qt-mobility-src-1.0.0-tp2/doc/src/snippets/qtcontactsdocsample/qtco ntactsdocsample.pro configure has finished. You may run mingw32-make to build the project now.Time to run mingw32-make and pray:
... g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS _QMAIN -I"c:\Qt\2009.05\qt\include\QtCore" -I"c:\Qt\2009.05\qt\include\QtGui" -I "c:\Qt\2009.05\qt\include" -I"c:\Qt\2009.05\qt\include\QtContacts_tp" -I"..\..\. .\..\src\global" -I"..\..\..\..\src\contacts" -I"..\..\..\..\src\contacts\reques ts" -I"..\..\..\..\src\contacts\filters" -I"..\..\..\..\src\contacts\details" -I "c:\QtMobility\include" -I"c:\Qt\2009.05\qt\include\ActiveQt" -I"..\..\..\..\bui ld\Release\qtcontactsdocsample\moc" -I"c:\Qt\2009.05\qt\mkspecs\win32-g++" -o .. \..\..\..\build\Release\qtcontactsdocsample\moc_requestexample.o ..\..\..\..\bui ld\Release\qtcontactsdocsample\moc\moc_requestexample.cpp g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o ..\..\..\..\bin\examples\qtcon tactsdocsample.exe ../../../../build/Release/qtcontactsdocsample/qtcontactsdocsa mple.o ../../../../build/Release/qtcontactsdocsample/moc_requestexample.o -L"c: \Qt\2009.05\qt\lib" -lmingw32 -lqtmain -LC:\qt-mobility-src-1.0.0-tp2/lib -LC:\Q tMobility/lib -lQtContacts_tp -lQtGui4 -lQtCore4 mingw32-make[4]: Leaving directory `C:/qt-mobility-src-1.0.0-tp2/doc/src/snippet s/qtcontactsdocsample' mingw32-make[3]: Leaving directory `C:/qt-mobility-src-1.0.0-tp2/doc/src/snippet s/qtcontactsdocsample' mingw32-make[2]: Leaving directory `C:/qt-mobility-src-1.0.0-tp2/doc/src/snippet s' mingw32-make[1]: Leaving directory `C:/qt-mobility-src-1.0.0-tp2/doc' C:\qt-mobility-src-1.0.0-tp2>_The build took a few minutes and it seems everything's fine.
configure -debug
"Generating Mobility Headers..." Access is denied. 'perl' is not recognized as an internal or external command, operable program or batch file. ...This is one reason why I
C:\strawberry>perl -v This is perl, v5.10.1 (*) built for MSWin32-x86-multi-thread Copyright 1987-2009, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.Unfortunately, Qt Command Prompt sets its own PATH environment variable, overriding. Before running configure, do:
set PATH=%PATH%;C:\strawberry\perl\binNow you can configure and build Qt Mobility on Windows properly.