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  · 

Using qmake

qmake provides a project-oriented system for managing the build process for applications, libraries, and other components. This approach gives developers control over the source files used, and allows each of the steps in the process to be described concisely, typically within a single file. qmake expands the information in each project file to a Makefile that executes the necessary commands for compiling and linking.

In this document, we provide a basic introduction to project files, describe some of the main features of qmake, and show how to use qmake on the command line.

Describing a Project

Projects are described by the contents of project (.pro) files. The information within these is used by qmake to generate a Makefile containing all the commands that are needed to build each project. Project files typically contain a list of source and header files, general configuration information, and any application-specific details, such as a list of extra libraries to link against, or a list of extra include paths to use.

Project files can contain a number of different elements, including comments, variable declarations, built-in functions, and some simple control structures. In most simple projects, it is only necessary to declare the source and header files that are used to build the project with some basic configuration options.

Complete examples of project files can be found in the qmake Tutorial. An introduction to project files can be found in the qmake Project Files chapter, and a more detailed description is available in the qmake Reference.

Building a Project

For simple projects, you only need to run qmake in the top level directory of your project. By default, qmake generates a Makefile that you then use to build the project, and you can then run your platform's make tool to build the project.

qmake can also be used to generate project files. A full description of qmake's command line options can be found in the Running qmake chapter of this manual.

Using Precompiled Headers

In large projects, it is possible to take advantage of precompiled header files to speed up the build process. This feature is described in detail in the Using Precompiled Headers chapter.

[Previous: qmake Manual] [Contents] [Next: qmake Project Files]

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 qtextended4.4
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