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  · 

Specifying Build Settings

Different build configurations allow you to quickly switch between different build settings. By default, Qt Creator creates debug and release build configurations. A debug build contains additional debug symbols that you need for debugging the application but that you can leave out from the release version. Generally, you use the debug configuration for testing and the release configuration for creating the final installation file.

You specify build settings in the Projects mode.

To add a new build configuration, click Add and select the type of configuration you would like to add. You can add as many build configurations as you need.

To delete the build configuration currently selected, click Remove.

Editing Build Configurations

To edit a build configuration:

  1. Select the build configuration you want to edit in Edit Build Configuration.
  2. In the Qt version field, select the Qt version to use for building project. You can add Qt versions to the list if they are installed on the development PC, but were not detected automatically. For more information, see Adding Qt Versions.
  3. In the Tool chain field, select the tool chain required to build the project. The tool chains that are compatible with the selected Qt version are listed. You can add tool chains to the list if they are not automatically detected. For more information, see Adding Tool Chains.
  4. In the Build directory field, specify the build directory for the project. By default, projects are built in a separate directory from the source directory, as shadow builds. This keeps the files generated for each target platform separate.

    Note: Shadow building is not supported by the Symbian build system. Also, shadow building on Windows is not supported for Maemo or MeeGo Harmattan. If you only build for one target platform, you can deselect the Shadow build checkbox.

Note: The build configuration for the Symbian Device target uses the GCCE tool chain by default. If you want to build for the device using RVCT, install the RVCT tool chain, and then select it in the Tool chain field. RVCT 2.2 is supported on Symbian^3 and earlier. RVCT 4.0 b902 or later is required for Symbian Belle.

Starting External Processes

Qt Creator executes external processes to accomplish tasks such as building and running applications. To execute the processes, Qt Creator uses shell commands that are native to the system. It constructs the commands from an executable name and optional command line arguments.

The executable name is specified in the executable fields: qmake, Make, Command, or Executable. It is either derived from the project or specified manually. When you specify executables manually, you can reference environment variables and Qt Creator variables. However, no quoting rules apply.

You can specify command-line arguments in the arguments fields: Additional arguments, Command arguments, Make arguments, or Arguments. You can create shell command lines that can contain redirection and other advanced constructs. However, some more complex use cases, such as piping test data into the application being tested or grouping commands, are not supported because the value of the Executable field is always placed first when constructing the command.

Using Environment Variables

You can use any environment variables as values in the fields. For a list of variable names, click Build Environment > Details in the Build Settings. Environment variables are referenced using the native syntax: $VARNAME or ${VARNAME} on Unix and %VARNAME% on Windows.

Using Qt Creator Variables

You can use Qt Creator variables in arguments, executable paths, and working directories. The variables take care of quoting their expansions, so you do not need to put them in quotes.

The following Qt Creator variables are available:

  • %{buildDir}
  • %{sourceDir}

Build Steps

The build system of Qt Creator is built on qmake and make. In Build Steps you can change the settings for qmake and make. Qt Creator runs the make command using the Qt version defined for the current build configuration.

"Build steps"

To override the shell command that Qt Creator constructs by default, remove the build step and add a custom build step that specifies another shell command.

Adding Custom Build Steps

To add custom steps to the build settings, select Add Build Step > Custom Process Step.

By default, custom steps are disabled. To activate a custom step, select the Enable custom process step check-box.

"Custom Process Step"

Clean Steps

You can use the cleaning process to remove intermediate files. This process might help you to fix obscure issues during the process of building a project.

"Clean steps"

You can define the cleaning steps for your builds in the Clean Steps:

  • To add a clean step using make or a custom process, click Add Clean Step and select the type of step you want to add.

    By default, custom steps are disabled. To activate a custom step, select the Enable custom process step check-box.

  • To remove a clean step, click Remove Item.
  • To change the order of steps, click .

Build Environment

You can specify the environment you want to use for building in the Build Environment section. By default, the environment in which Qt Creator was started is used and modified to include the Qt version. Depending on the selected Qt version, Qt Creator automatically sets the necessary environment variables. You can edit existing environment variables or add, reset and unset new variables based on your project requirements.

"Build Environment"

Note: The changes are stored in the local project specific .pro.user file. Therefore, they are not suitable for sharing between developers or development PCs. To share settings, incorporate them into the build system. For example, if you use qmake, make the changes in the .pro file.

Clearing the System Environment

To build with a clean system environment, select the Clear system environment check box. Qt Creator discards the current environment, and populates a clean system environment with the environment variables that the compilers and tools need. Therefore, the environment is never totally empty, even after you clear it.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
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 44
  2. Microsoft ouvre aux autres compilateurs C++ AMP, la spécification pour la conception d'applications parallèles C++ utilisant le GPU 22
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. RIM : « 13 % des développeurs ont gagné plus de 100 000 $ sur l'AppWord », Qt et open-source au menu du BlackBerry DevCon Europe 0
  5. 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
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le Qt Quarterly au hasard

Logo

XQuery et la météo

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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 qtcreator-2.3
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