Copie du wikimiroir

Ceci est un miroir du wiki de pascal.chat. La modification, l’historique et la connexion se trouvent là-bas.

IDE Window: Unit info/fr

Deutsch · English · Français

Cette boite de dialogue montre diverses informations sur le fichier en cours dans l'éditeur de source.

Général

Voir->information de l'unité

Chemin des unités

These are the unit paths used by the IDE for this file. The unit paths are used to search for .ppu, .pas, .pp, .p files. Normally these paths are give to the compiler. But there are cases where this is not the case. And it does not show the unit paths defined in the compiler config file (fpc.cfg).

These paths are created by the rules in the Environment -> CodeTools defines editor. All files in a directory share the same search paths (unit paths, include paths, ...). If this a project directory, all project unit paths are added. If the directory belongs to a package its unit paths will be added. If you put a project and a package into one directory, both paths will be added. That it why it is recommended to give packages and projects directories of their own.

Difference between compiler search paths and IDE search paths: Normally the difference does not matter. The compiler is invoked in one directory with a set of search paths. For example: There are 4 packages:

text
 /home/user/package1/package1.lpk
 /home/user/package2/package2.lpk
 /home/user/package3/package3.lpk using package1 and package2
 /home/user/package4/package4.lpk using package1 and package2

When package3 is compiled in /home/user/package3 with unit path /home/user/package1/;/home/user/package2/. When the compiler finds a unit in /home/user/package2/ and compiles it it applies all unit paths, including path to /home/user/package3/. This is normally unwanted and therefore a standard package defines an output directory. But for this example we assume the package compiles it .ppu files into the source directory.

When the compiler is invoked for package4 it will be started in a different directory with different search paths. Here it is invoked in /home/user/package4 with unit path /home/user/package1/;/home/user/package2/. When the compiler finds a unit in /home/user/package2/ and compiles it it applies all unit paths, including the path to package4. This means the compiler compiles the units in package2 with two different unit paths. This is normally a bad idea as the result depends on the order - if you compile first package3 then package4 or the other way round. But in real world (e.g. the Delphi world) this is more common than one would expect. It is clear, that if packages contain the units with the same name the order of the file paths in the search paths becomes important.

The IDE solves this by collecting search paths for every directory. That means for example the search paths for the Lazarus sources have their own unit paths and do not include the unit paths to your project. A directory, that is not part of your project, does not include the unit paths of your project. This way you can browse Delphi VCL sources and Lazarus LCL sources both containing units with same names.

Inclure les chemins

Pareil que les chemins des unités, mais pour les chemins des fichiers d'inclusion. Montre les chemins de recherche pour les directives d'inclusion {$I filename.inc} ou {$INCLUDE filename.inc}.

Chemins des sources

This is the unit path plus the compiled source paths. For example:

text
 /home/user/project
 /home/user/package/lib

The project uses the package. The package source files are in /home/user/package and the output files (.ppu) of the package are put in /home/user/package/lib. The unit path of the project will contain the path to the output directory of the package - /home/user/package/lib. So when the compiler is invoked to compile the project it finds the .ppu files of the package, but not the source (.pas) of the package. This way it can not recompile the package, which is good, because the compiler options of the project are probably different than for the package. The IDE should find the source files (.pas). It knows, that /home/user/package/lib is the output directory of the package, so it adds the unit path of the package to the source path of the project. This addition is called the compiled source path.

Afficher les valeurs des outils de code

Voir Outils de code Répertoire de valeurs


From the Free Pascal wiki, page "IDE Window: Unit info/fr", as it stood on 2007-07-14 after a change by Paulatreides, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Version 3, dernière modification par WikiArchive .