IDE Window: Compiler Options/fr

From Free Pascal wiki
Jump to navigationJump to search

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) русский (ru)

Chemins

OptionsduCompilateur1.jpg
  • Les chemins relatifs sont développés avec le répertoire du projet ou du paquet (là où le fichier .lpi/.lpk est).
  • Ces chemins sont ajoutés aux chemins de recherche .
  • Il n'y a aucun moyen d'enlever un chemin des chemins de recherche
  • Si un paquet ou un projet utilise un paquet, il héritera de l'utilisation des chemins de recherche. Vous pouvez voir les chemins de recherche hérités dans la page Hérité.
  • En utilisant le système de paquet de Lazarus, vous devez à peine paramétrer les chemins de recherche manuellement.
  • Le compilateur Free Pascal a un fichier de configuration par lui-même (par défaut /etc/fpc.cfg) qui définit un ensemble de chemins de recherche. Par exemple pour trouver les unités FPC de la bibliothèque RTL ou FCL comme 'classes', 'sysutils'.
  • Les chemins de recherche sont séparés par un point-virgule ';'.
  • Les espaces en en-tête et en queue sont ignorés .
  • Vous pouvez employer des macros. Par exemple $(TargetCPU). Voir Les macros de l'IDE dans les chemins et les noms de fichier.

Les autres Fichiers unité

C'est le chemin de recherche pour les unités Pascal (.ppu, .pp, .pas, .p) du projet ou du paquet. Voir le titre de la fenêtre pour savoir lequel.(Dans la capture d'écran, il s'agit du paquet DBFlaz 0.1.1) Ce chemin est donné au compilateur Free Pascal, qui l'ajoute à son chemin d'unité .

  • Ajouter et enlever des unités au projet/paquet ajustera automatiquement le chemin des unités.
  • PRENDRE GARDE : if a package uses a separate output directory for its .ppu files, do not add the source directories to this path. Otherwise FPC will rebuild the .ppu of the package and put them into your project directory. You will end up with multiple .ppu versions and you will get strange 'Can not find unit' errors.

For example: Do not add any FPC or Lazarus source (.pas or .pp) directory to this search path.

Include Files

This is the search path for the include files (e.g. .inc, .lrs files). This path is given to the FreePascal Compiler, which adds it to its Include Path, which is used by include directives like {$I filename.inc} or {$INCLUDE filename.inc}.

Other sources

This is the search path for pascal unit sources, that is only used by the IDE and not by the compiler.

Example: You have a directory with sources and a directory with the corresponding .ppu files. You add the .ppu directory to the 'Other Unit Files' path and the .pas directory to the 'Other sources' path. This way the compiler will use the .ppu files and not try to rebuild them everytime. And the IDE will find the sources and Find Declaration works.

Libraries

This is the search path for libraries (.dll or .so or .a files).

Unit output directory

This is directory, where the compiler will put all output, like .ppu, .o, .rst files.

Note: Packages normally inherited their output directory via the 'usage' options.

Debugger path addition

These directories are added to the search path of the IDE debugger, when it searches for sources (units and include files).

LCL widget type

This is the used LCL widget set. Normally the default widget set is used. If you want to try another or you are cross compiling, set here another widget set.

  • The default widget set of a package is the widget set of the current project.
  • The default widget set of the current project depends on the current operating system. For example: win32 for windows 2000.
  • You should not set the widget set for a package, because then the project can not override it. Only set it, if the package is part of a set of packages - one for each widget set.

Analyse

OptionsduCompilateur2.jpg

See Free Pascal - Online documentation

Style

  • -R<x> assembler reading style:
  • -Rdefault use default assembler
  • -Ratt read AT&T style assembler
  • -Rintel read Intel style assembler

Syntax Options

  • Delphi 2 Extensions
  • C Style Operators (*=, +=, /= and -=)
  • Include Assertion Code
  • Allow LABEL and GOTO
  • C++ Styled INLINE
  • C Style Macros (global)
  • TP/BP 7.0 Compatible
  • Constructor name must be init (destructor must be done)
  • Static Keyword in Objects
  • Delphi Compatible
  • Use Ansi Strings
  • GPC (GNU Pascal Compiler) Compatible

Code

OptionsduCompilateur3.jpg

See Free Pascal - Online documentation

Edition des liens

OptionsduCompilateur4.jpg

See Free Pascal - Online documentation

Messages

OptionsduCompilateur5.jpg

See Free Pascal - Online documentation

Autre

OptionsduCompilateur6.jpg

See Free Pascal - Online documentation

Hérité

OptionsduCompilateur7.jpg

This page shows all the compiler options inherited from packages. Packages inherit options via their 'usage' options.

The topmost node shows all inherited options, that is the sum of all used packages.

The nodes below show the inherited options of each use package.

Compilation

OptionsduCompilateur8.jpg

Create Makefile

Enable this, if the IDE should create a Makefile and a Makefile.fpc before each build. This is currently only supported for packages, not for projects.

Execute before

Setup here a command to execute before running the compiler.

Call on:

  • Compile - execute when normally compiling (F9).
  • Build - execute when rebuilding all. This could for example a script to clean up.
  • Run - execute when quick compiling. When running a project, the IDE checks if rebuild is needed. If no rebuild is needed the IDE skips the compile step. Set this option to always execute the command, even if the compile step is skipped.

The IDE can parse and filter the output of the command and stop on errors. Check the boxes for which messages the IDE should watch.

Compiler

This is compiler path used by the project or package. Default is the macro $(CompPath), which is replaced with the compiler filename in the environment options.

Execute after

Setup here a command to execute after running the compiler. See above 'Execute before' for details.