Difference between revisions of "IDE Window: Compiler Options"

From Lazarus wiki
Jump to navigationJump to search
Line 1: Line 1:
 
== Paths ==
 
== Paths ==
 +
 +
* Relative paths are expanded with the project or package directory (where .lpi/.lpk file is).
 +
* These paths are added to the search paths.
 +
* There is no way to remove a path from the search paths
 +
* If a package or project uses a package, it will inherited the ''usage'' search paths. You can see the inherited search paths in the [[#Inherited]] page.
 +
* The FreePascal Compiler has a configuration file of its own (default /etc/fpc.cfg) which defines a set of search paths. For example to find the FPC units of the RTL or the FCL like 'classes', 'sysutils'.
  
 
=== Other Unit Files ===
 
=== Other Unit Files ===
  
Set here the search path for the pascal units (.ppu, .pp, .pas, .p). Relative paths are expanded with the project or package directory (where .lpi/.lpk file is).
+
This is the search path for the pascal units (.ppu, .pp, .pas, .p) of the project or package. See the title of the window to know which.
This path is given to the FreePascal Compiler, so it uses all these files for building.
+
This path is given to the FreePascal Compiler, which adds it to its Unit Path.
  
 
BEWARE: 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.
 
BEWARE: 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.
 
For example: Do not add any FPC or Lazarus source (.pas or .pp) directory to this search path.
  
 +
=== Include Files ===
  
=== 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}.
  
 
== Parsing ==
 
== Parsing ==

Revision as of 17:24, 30 April 2006

Paths

  • Relative paths are expanded with the project or package directory (where .lpi/.lpk file is).
  • These paths are added to the search paths.
  • There is no way to remove a path from the search paths
  • If a package or project uses a package, it will inherited the usage search paths. You can see the inherited search paths in the #Inherited page.
  • The FreePascal Compiler has a configuration file of its own (default /etc/fpc.cfg) which defines a set of search paths. For example to find the FPC units of the RTL or the FCL like 'classes', 'sysutils'.

Other Unit Files

This is the search path for the pascal units (.ppu, .pp, .pas, .p) of the project or package. See the title of the window to know which. This path is given to the FreePascal Compiler, which adds it to its Unit Path.

BEWARE: 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}.

Parsing

Code

Linking

Messages

Other

Inherited