Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference

Compile and Run Example Application

Compile and Build the Example

Prior to compiling the example application, it is necessary to setup the environment.

To compile and build the example, follow these steps:

  1. Create a copy of the example:
       cd somewhere
       cp -r $QPEDIR/examples/application .
       chmod +w application/*
       cd application
    

  2. Generate a Makefile:
       qmake -spec $QPEDIR/mkspecs/qws/linux-generic-g++ application.pro
    

  3. Build the Example:
       make
    

Install and Run the Example

Installing onto an SDK requires root privileges which are obtained using a utility such as su, sudo. $QPEDIR must be used for /path/to/image.

Install the Example using:

   make install INSTALL_ROOT=/path/to/image

To run the example:

   run the 'startdemo' script from the qtopia/bin directory.

The example application should now be available in the Applications tab which is visible inside the Qt Virtual Framebuffer window.

Uninstall the Example

To unistall the example requires root privileges which are obtained using a utility such as su, sudo. $QPEDIR must be used for /path/to/image.

The following command is used to uninstall the example:

   make uninstall INSTALL_ROOT=/path/to/image

Using the Example Program to Make an Application

To make an application using the example program as a model:

Note: The qmake step is not always required as qmake will re-build the Makefile when the .pro file has changed.

To make a package suitable for installing on a device ensure the compiler targets the correct CPU family then use the following command:

   make packages

The resulting package ipkg/example-1.0.0.ipk can be installed on a Qtopia device using Qtopia Desktop or the Software Packages application.

Targeting Older Qtopia devices

If an older Qtopia device is targeted, the QTOPIA_COMPAT_VER variable must be set to the version of Qtopia to be used. This variable accepts the values 1.5, 1.7 and 2 and prevents linking against libraries not found in these Qtopia releases. More information can be found in the build system documentation.


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.2.0