fpc.cfg - Online Linux Manual PageSection : 5
Updated : 22 february 2002
Source : FPC
Note : FPC configuration file
NAMEfpc.cfg − Free Pascal Compiler (FPC) configuration file, name derived from Free Pascal Compiler.
DESCRIPTIONThis is the main configuration file of the Free Pascal Compiler (FPC) All commandline options of the compiler (described in fpc(1) ) can be specified in fpc.cfg When the configuration file is found, it is read, and the lines it contains are treated like you typed them on the command line see fpc(1) with some extra condtional possibilities.
SYNTAXYou can specify comments in the configuration file with the # sign. Everything from the # on will be ignored, unless it is one of the keywords (see below). The compiler looks for the fpc.cfg file in the following places : \\fI\- Under Linux and unix\fP
\\\- The current directory.
\\\- Home directory, looks for .fpc.cfg
\\\- The directory specified in the environment
\\ variable PPC\_CONFIG\_PATH, and if it's not
\\ set under compilerdir/../etc.
\\\- If it is not yet found: in /etc. \\fI- Under all other OSes:\fP
\\\- The current directory.
\\\- The directory specified in the environment
\\ variable PPC\_CONFIG\_PATH.
\\\- The directory where the compiler binary is.
When the compiler has finished reading the configuration file, it continues to treat the command line options. One of the command−line options allows you to specify a second configuration file: Specifying \@foo on the command line will use file foo instead of fpc.cfg and read further options from there. When the compiler has finished reading this file, it continues to process the command line. The configuration file allows some kind of preprocessing. It understands the following directives, which you should place on the first column of a line : \#IFDEF
\#IFNDEF
\#ELSE
\#ENDIF
\#DEFINE
\#UNDEF
\#WRITE
\#INCLUDE
\#SECTION
They work the same way as their $... directive counterparts in Pascal: #IFDEF Syntax #IFDEF name Lines following #IFDEF are skipped read if the keyword "name" following it is not defined. They are read until the keywords #ELSE or #ENDIF are encountered, after which normal processing is resumed. Example #IFDEF VER0_99_12
−Fu/usr/lib/fpc/0.99.12/rtl
#ENDIF
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to the path if you're compiling with version 0.99.12 of the compiler. #IFNDEF Syntax #IFNDEF name Lines following #IFDEF are skipped read if the keyword "name" following it is defined. They are read until the keywords #ELSE or #ENDIF are encountered, after which normal processing is resumed. Example #IFNDEF VER0_99_12
−Fu/usr/lib/fpc/0.99.13/rtl
#ENDIF In the above example, /usr/lib/fpc/0.99.13/rtl will be added to the path if you're NOT compiling with version 0.99.12 of the compiler. #ELSE Syntax #ELSE #ELSE can be specified after a #IFDEF or #IFNDEF directive as an alternative. Lines following #ELSE are skipped read if the preceding #IFDEF #IFNDEF was accepted. They are skipped until the keyword #ENDIF is encountered, after which normal processing is resumed. Example #IFDEF VER0_99_12
−Fu/usr/lib/fpc/0.99.12/rtl
#ELSE
−Fu/usr/lib/fpc/0.99.13/rtl
#ENDIF
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to the path if you're compiling with version 0.99.12 of the compiler, otherwise /usr/lib/fpc/0.99.13/rtl will be added to the path. #ENDIF Syntax #ENDIF #ENDIF marks the end of a block that started with #IF(N)DEF, possibly with an #ELSE between it. #DEFINE Syntax #DEFINE name #DEFINE defines a new keyword. This has the same effect as a "−dname" command−line option. #UNDEF Syntax #UNDEF name #UNDEF un-defines a keyword if it existed. This has the same effect as a "−uname" command-line option. #WRITE Syntax #WRITE Message Text #WRITE writes "Message Text" to the screen. This can be useful to display warnings if certain options are set. Example #IFDEF DEBUG
#WRITE Setting debugging ON...
−g
#ENDIF
if "DEBUG is defined, this will produce a line Setting debugging ON... and will then switch on debugging information in the compiler. #INCLUDE Syntax #INCLUDE filename #INCLUDE instructs the compiler to read the contents of "filename" before continuing to process options in the current file. This can be useful if you want to have a particular configuration file for a project (or, under Unix like systems (such as Linux), in your home directory), but still want to have the global options that are set in a global configuration file. Example #IFDEF LINUX
#INCLUDE /etc/fpc.cfg
#ELSE
#IFDEF GO32V2
#INCLUDE c:\pp\\bin\\fpc.cfg
#ENDIF
#ENDIF
This will include /etc/fpc.cfg if you're on a unix like machine (like linux), and will include c:\pp\\bin\\fpc.cfg on a dos machine. #SECTION Syntax #SECTION name The #SECTION directive acts as a #IFDEF directive, only it doesn't require an #ENDIF directive. the special name COMMON always exists, i.e. lines following #SECTION COMMON are always read.
ExampleA standard block often used in (the Linux version of) fpc.cfg is −vwhin
#IFDEF VER0_99_12
#IFDEF FPC_LINK_STATIC
−Fu/usr/lib/fpc/0.99.12/rtl/static
−Fu/usr/lib/fpc/0.99.12/units/static
#ENDIF
#IFDEF FPC_LINK_DYNAMIC
−Fu/usr/lib/fpc/0.99.12/rtl/shared
−Fu/usr/lib/fpc/0.99.12/units/shared
#ENDIF
−Fu/usr/lib/fpc/0.99.12/rtl
−Fu/usr/lib/fpc/0.99.12/units
#ENDIF The block is copied into the fpc.cfg file for each version you use (normally the latest release and the lastest developpers snapshot.
SEE ALSOfpc(1) 0
Johanes Gumabo
Data Size : 21,094 byte
man-fpc.cfg.5Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 204,466
Visitor ID : :
Visitor IP : 3.149.24.70 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (rof_escape_sequence|91|fpc.cfg.5|25|\ \fI\- Under Linux and unix\fP |\ \fI\- Under Linux and unix\fP
) (rof_escape_sequence|91|fpc.cfg.5|27|\ \ \- The current directory. |\ \ \- The current directory.
) (rof_escape_sequence|91|fpc.cfg.5|29|\ \ \- Home directory, looks for .fpc.cfg |\ \ \- Home directory, looks for .fpc.cfg
) (rof_escape_sequence|91|fpc.cfg.5|31|\ \ \- The directory specified in the environment |\ \ \- The directory specified in the environment
) (rof_escape_sequence|91|fpc.cfg.5|33|\ \ variable PPC\_CONFIG\_PATH, and if it's not |\ \ variable PPC\_CONFIG\_PATH, and if it's not
) (rof_escape_sequence|91|fpc.cfg.5|35|\ \ set under compilerdir/../etc. |\ \ set under compilerdir/../etc.
) (rof_escape_sequence|91|fpc.cfg.5|37|\ \ \- If it is not yet found: in /etc. |\ \ \- If it is not yet found: in /etc.
) (rof_escape_sequence|91|fpc.cfg.5|39|\ \fI- Under all other OSes:\fP |\ \fI- Under all other OSes:\fP
) (rof_escape_sequence|91|fpc.cfg.5|41|\ \ \- The current directory. |\ \ \- The current directory.
) (rof_escape_sequence|91|fpc.cfg.5|43|\ \ \- The directory specified in the environment |\ \ \- The directory specified in the environment
) (rof_escape_sequence|91|fpc.cfg.5|45|\ \ variable PPC\_CONFIG\_PATH. |\ \ variable PPC\_CONFIG\_PATH.
) (rof_escape_sequence|91|fpc.cfg.5|47|\ \ \- The directory where the compiler binary is. |\ \ \- The directory where the compiler binary is.
) (rof_escape_sequence|91|fpc.cfg.5|55|\@foo on the command line will use file foo instead of fpc.cfg |file: Specifying \@foo on the command line will use file foo instead of fpc.cfg
) (rof_escape_sequence|91|fpc.cfg.5|63|\ #IFDEF |\ #IFDEF
) (rof_escape_sequence|91|fpc.cfg.5|65|\ #IFNDEF |\ #IFNDEF
) (rof_escape_sequence|91|fpc.cfg.5|67|\ #ELSE |\ #ELSE
) (rof_escape_sequence|91|fpc.cfg.5|69|\ #ENDIF |\ #ENDIF
) (rof_escape_sequence|91|fpc.cfg.5|71|\ #DEFINE |\ #DEFINE
) (rof_escape_sequence|91|fpc.cfg.5|73|\ #UNDEF |\ #UNDEF
) (rof_escape_sequence|91|fpc.cfg.5|75|\ #WRITE |\ #WRITE
) (rof_escape_sequence|91|fpc.cfg.5|77|\ #INCLUDE |\ #INCLUDE
) (rof_escape_sequence|91|fpc.cfg.5|79|\ #SECTION |\ #SECTION
) (rof_escape_sequence|91|fpc.cfg.5|232|\pp\\bin\\fpc.cfg | #INCLUDE c:\\pp\\bin\\fpc.cfg
) (rof_escape_sequence|91|fpc.cfg.5|240|\pp\\bin\\fpc.cfg on a dos machine. |and will include c:\\pp\\bin\\fpc.cfg on a dos machine.
)