Thursday, June 10, 2010

Installing Qt Mobility Final Libraries on Windows 7

By following this article, you should be ready to develop Qt Mobility applications on Windows.

Note: This is only for Qt for Windows installation. If you want to develop Qt applications for Symbian on Windows, click here.
  1. Install Qt SDK 4.6.3 + Qt Creator 1.3.1 for Windows.
  2. Install Strawberry Perl for Windows (~ 32 MB). The reason why Perl is needed is covered in the later in this article.
  3. Download Qt Mobility library sources.
  4. Unpack Qt Mobility source distribution into a drive, e.g. C:\. This will create C:\qtmobility\qt-mobility-opensource-src-1.0.0
  5. Launch Qt Command Prompt.
    IMPORTANT: You cannot use regular Command Prompt!
  6. Set the PATH to Strawberry Perl : (do not skip this!)


    set PATH=%PATH%;C:\strawberry\perl\bin
    
  7. Go to your Qt Mobility source folder and run configure:


    cd \qt-mobility-opensource-src-1.0.0
    configure
    
    This will configure Qt Mobility build with default target directory: C:\QtMobility

  8. Build Qt Mobility:


    mingw32-make
    mingw32-make install
  9. Add C:\QtMobility\lib folder (the target folder) to your PATH environment variable (more on this below).
  10. To add Qt Mobility documentation in Qt Creator: Go to Tools -> Options -> Help -> Add. Then browse C:\QtMobility/doc/qch/qtmobility.qch
Now you're ready to develop with Qt Mobility on Windows. Check out Qt Mobility Quickstart App for an example.



Setting Environment Variables

In order to use Qt Mobility some environment variables need to be extended to locate the libraries, which are placed in the lib directory of the install path.

On Windows: PATH should be extended to include: C:\%TARGET_DIR%\lib

On my setup this folder is: C:\QtMobility\lib



PATH can be extended through Start -> Settings -> Control Panel -> System -> Advanced -> Environment variables. Under System variables, select "PATH", click "Edit..." and append your Qt Mobility lib folder.

Reboot your system to apply your changes to system environment variables.

You're now ready to develop Qt Mobility applications in Windows. :-)

See also:

4 comments:

  1. Please help me ,how to use the mobility api classes in Qt creator, .after the API installation i'm getting the include file in project(ex: #include...but when i'm trying to get its members it's not accessible..

    ReplyDelete
  2. Hi,
    thank you for your tutorial.
    When i try to compile qt mobility, launching configure, i get this error:
    Project ERROR: Must have a Symbian sensor backend available
    configure failed.

    Have you any idea?
    Thank you,
    Lewix

    ReplyDelete
  3. I try to use configure command but it display error "cannot find qmake in your PATH"

    ReplyDelete
  4. Some environment variables are not always to be extended to Qt Mobility, as it all depends on the location of the Lib directory or intergation of software, for example in some software development companies - click here for view.

    ReplyDelete

Be the first to comment!