Cross-Compiling ApplicationsCross-compiling is the process of executing a compile on one machine, producing object/executable code for a different machine or device.
Step 1: Setting the Cross-Compiler's PathSpecify the cross compiler by setting the PATH environment variable. For example, if the current shell is bash, ksh, zsh or sh: export PATH=path/to/cross/compiler:$PATH Step 2: Including the Required LibrariesMake sure that all the libraries needed for the application, as well as for the Qt libraries, are present in the tool chain. In particular, if the zlib and jpeg libraries are not available, they must be included by running the configure script with the -L and -I options. For example: cd path/to/Qtopia/Core ./configure -L /path/to/libjpeg/libraries -I /path/to/libjpeg/headers The JPEG source can be downloaded from http://www.ijg.org/. The Qtopia Core distribution includes a version of the zlib source that can be compiled into the Qtopia core library. If integrators wish to use a later version of the zlib library, it can be downloaded from the http://www.gzip.org/zlib/ website. Step 3: Creating a Target Specific qmake SpecificationThe qmake tool requires a qmake.conf file describing the platform and compiler specific default values used to generate appropriate Makefiles. The standard Qtopia Core distribution provides such files for several combinations of platforms and compilers. These files are located in the mkspecs subdirectory. Create a qmake.conf fitting your target environment by copying an already existing file. It is recommended to copy the entire directory, for example: cp path/to/Qtopia/Core/mkspecs/qws/linux-mips-g++/... path/to/Qtopia/Core/mkspecs/qws/linux-myplatform-g++/... Then customize the new platform specific qmake.conf file. Step 4: Providing Mouse and Keyboard DriversWithout the proper mouse and keyboard drivers, you won't be able to give any input to your application when it is installed on the target device. By default, Qtopia Core provides mouse drivers for the MouseMan, IntelliMouse, Microsoft, NEC Vr41XX, Linux Touch Panel and Yopy protocols as well as the universal touch screen library, tslib. The provided keyboard drivers are SL5000, Yopy, Vr41XX, console (TTY) and USB. Other drivers can be added by deriving from the QWSMouseHandler and QMouseDriverPlugin classes, or the QWSKeyboardHandler and QKbdDriverPlugin classes, and using Qt's plugin mechanism. See the How to Create Qt Plugins documentation and the Plug & Paint example for details. Step 5: Building the Target Specific ExecutableBefore building the executable, run the configure script specifying the platform architecture as well as the platform specific mouse, keyboard and graphics drivers: cd path/to/Qtopia/Core ./configure -embedded myplatform -qt-kbd-<mykeyboarddriver> -qt-mouse-<mymousedriver> -qt-gfx-<mygraphicsdriver> cd path/to/myApplication qmake -project qmake make That's all. Your target specific executable is ready for deployment.
[Contents] |
Publicité
Best OfActualités les plus luesSemaine
Mois
Année
Le blog Digia au hasardDéploiement d'applications Qt Commercial sur les tablettes Windows 8Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.
CommunautéRessources
Liens utilesContact
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.1 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com