Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Installing Qt for Embedded Linux

This document describes how to install Qt for Embedded Linux in your development environment:

Please see the cross compiling and deployment documentation for details on how to install Qt for Embedded Linux on your target device.

Note also that this installation procedure is written for Linux, and that it may need to be modified for other platforms.

Step 1: Installing the License File (commercial editions only)

If you have the commercial edition of Qt for Embedded Linux, the first step is to install your license file as $HOME/.qt-license.

For the open source version you do not need a license file.

Step 2: Unpacking the Archive

First uncompress the archive in the preferred location, then unpack it:

 cd <anywhere>
 gunzip qt-everywhere-opensource-src-4.7.tar.gz
 tar xf qt-everywhere-opensource-src-4.7.tar

This document assumes that the archive is unpacked in the following directory:

 ~/qt-everywhere-opensource-src-4.7

Step 3: Building the Library

Before building the Qt for Embedded Linux library, run the ./configure script to configure the library for your development architecture. You can list all of the configuration system's options by typing

 ./configure -embedded -help

Note that by default, Qt for Embedded Linux is configured for installation in the /usr/local/Trolltech/QtEmbedded-4.7 directory, but this can be changed by using the -prefix option. Alternatively, the -prefix-install option can be used to specify a "local" installation within the source directory.

The configuration system is also designed to allow you to specify your platform architecture:

 cd  ~/qt-everywhere-opensource-src-4.7
 ./configure -embedded [architecture]

In general, all Linux systems which have framebuffer support can use the generic architecture. Other typical architectures are x86, arm and mips.

Note: If you want to build Qt for Embedded Linux for use with a virtual framebuffer, pass the -qvfb option to the configure script.

To create the library and compile all the demos, examples, tools, and tutorials, type:

 make

On some systems the make utility is named differently, e.g. gmake. The configure script tells you which make utility to use.

If you did not configure Qt for Embedded Linux using the -prefix-install option, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. To do this, type:

 su -c "make install"

and enter the root password.

Note: You can use the INSTALL_ROOT environment variable to specify the location of the installed files when invoking make install.

Step 4: Adjusting the Environment Variables

In order to use Qt for Embedded Linux, the PATH variable must be extended to locate qmake, moc and other Qt for Embedded Linux tools, and the LD_LIBRARY_PATH must be extended for compilers that do not support rpath.

To set the PATH variable, add the following lines to your .profile file if your shell is bash, ksh, zsh or sh:

 PATH=/usr/local/Trolltech/QtEmbedded-4.7/bin:$PATH
 export PATH

In case your shell is csh or tcsh, add the following line to the .login file instead:

 setenv PATH /usr/local/Trolltech/QtEmbedded-4.7/bin:$PATH

If you use a different shell, please modify your environment variables accordingly.

For compilers that do not support rpath you must also extend the LD_LIBRARY_PATH environment variable to include /usr/local/Trolltech/QtEmbedded-4.7/lib. Note that on Linux with GCC, this step is not needed.

Step 5: Building the Virtual Framebuffer

For development and debugging, Qt for Embedded Linux provides a virtual framebuffer as well as the option of running Qt for Embedded Linux as a VNC server. For a description of how to install the virtual framebuffer and how to use the VNC protocol, please consult the documentation at:

Note that the virtual framebuffer requires a Qt for X11 installation. See Installing Qt for X11 Platforms for details.

The Linux framebuffer, on the other hand, is enabled by default on all modern Linux distributions. For information on older versions, see http://en.tldp.org/HOWTO/Framebuffer-HOWTO.html. To test that the Linux framebuffer is set up correctly, use the program provided by the Testing the Linux Framebuffer document.

That's all. Qt for Embedded Linux is now installed.

Customizing the Qt for Embedded Linux Library

When building embedded applications on low-powered devices, reducing the memory and CPU requirements is important.

A number of options tuning the library's performance are available. But the most direct way of saving resources is to fine-tune the set of Qt features that is compiled. It is also possible to make use of accelerated graphics hardware.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Comment fermer une application

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.7
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web