コマンドスクリプト |
---|
コマンドスクリプト | コンパイルモード | 備考 |
---|---|---|
fpc64.cmd | Windows 64bit ノーマルモード | 既定の設定に、I/O, オーバーフロー, 範囲, スタック のチェックを追加。 |
fpc64deb.cmd | Windows 64bit デバッグモード | 既定の設定に、I/O, オーバーフロー, 範囲, スタック のチェック 及びデバッグ情報を追加。 |
fpc64rel.cmd | Windows 64bit リリースモード | 既定の設定に、レベル2の最適化とデバッグ情報削除を追加。 |
fpc32.cmd | Windows 32bit ノーマルモード | 既定の設定に、I/O, オーバーフロー, 範囲, スタック のチェックを追加。 |
fpc32deb.cmd | Windows 32bit デバッグモード | 既定の設定に、I/O, オーバーフロー, 範囲, スタック のチェック 及びデバッグ情報を追加。 |
fpc32rel.cmd | Windows 32bit リリースモード | 既定の設定に、レベル2の最適化とデバッグ情報削除を追加。 |
@ECHO OFF REM REM Free Pascal コンパイル - Windows 64bit 標準モード。(追加:iocheck, overflow, range, stack) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -Ciort %* ) ENDLOCAL
@ECHO OFF REM REM Free Pascal コンパイル - Windows 64bit デバッグモード。(fpc.cfgによりデバッグ情報とiocheck, overflow, range, stack追加) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -dDEBUG %* ) ENDLOCAL
@ECHO OFF REM REM Free Pascal コンパイル - Windows 64bit リリースモード。(fpc.cfgによりレベル2の最適化とデバッグ情報削除) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin64 -Px86_64 -dRELEASE %* ) ENDLOCAL
@ECHO OFF REM REM Free Pascal コンパイル - Windows 32bit 標準モード。(追加:iocheck, overflow, range, stack) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -Ciort %* ) ENDLOCAL
@ECHO OFF REM REM Free Pascal コンパイル - Windows 32bit デバッグモード。(fpc.cfgによりデバッグ情報とiocheck, overflow, range, stack追加) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -dDEBUG %* ) ENDLOCAL
@ECHO OFF REM REM Free Pascal コンパイル - Windows 32bit リリースモード。(fpc.cfgによりレベル2の最適化とデバッグ情報削除) REM SETLOCAL SET FPCDIR=C:\FPC\3.2.2 IF "%1" == "" ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -? ) ELSE ( "%FPCDIR%\bin\i386-win32\fpc.exe" -Twin32 -Pi386 -dRELEASE %* ) ENDLOCAL
コマンドスクリプトでコンパイル |
---|
C:\PG>CD FreePascal\Hello
C:\PG\FreePascal\Hello>fpc64deb Hello.pas
Compiling Debug Version
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling Hello.pas
Linking Hello.exe
14 lines compiled, 0.1 sec, 85680 bytes code, 5300 bytes data
C:\PG\FreePascal\Hello>Hello
世界よ、こんにちは。
C:\PG\FreePascal\Hello>
コンパイラオプション |
---|
C:\PG>CD FreePascal\Hello
C:\PG\FreePascal\Hello>fpc64 -oSample.exe Hello.pas
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling Hello.pas
LinkingSample.exe
14 lines compiled, 0.1 sec, 72688 bytes code, 5252 bytes data
C:\PG\FreePascal\Hello>Sample
世界よ、こんにちは。
C:\PG\FreePascal\Hello>
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others C:\FPC\3.2.2\bin\i386-win32\fpc.exe [options] <inputfile> [options] Only options valid for the default or selected platform are listed. Put + after a boolean switch option to enable it, - to disable it. @<x> Read compiler options from <x> in addition to the default fpc.cfg -a The compiler does not delete the generated assembler file -a5 Don't generate Big Obj COFF files for GNU Binutils older than 2.25 (Windows, NativeNT) -al List sourcecode lines in assembler file -an List node info in assembler file (-dEXTDEBUG compiler) -ao Add an extra option to external assembler call (ignored for internal) -ar List register allocation/release info in assembler file -at List temp allocation/release info in assembler file -A<x> Output format: -Adefault Use default assembler -Aas Assemble using GNU AS -Agas Assemble using GNU GAS -Agas-darwin Assemble darwin Mach-O64 using GNU GAS -Amasm Win64 object file using ml64 (Microsoft) -Apecoff PE-COFF (Win64) using internal writer -Aelf ELF (Linux-64bit) using internal writer -Ayasm Assemble using Yasm (experimental) -Anasm Assemble using Nasm (experimental) -Anasmwin64 Assemble Win64 object file using Nasm (experimental) -Anasmelf Assemble Linux-64bit object file using Nasm (experimental) -Anasmdarwin Assemble darwin macho64 object file using Nasm (experimental) -b Generate browser info -bl Generate local symbol info -B Build all modules -C<x> Code generation options: -C3 Turn on ieee error checking for constants -Ca<x> Select ABI; see fpc -i or fpc -ia for possible values -Cb Generate code for a big-endian variant of the target architecture -Cc<x> Set default calling convention to <x> -CD Create also dynamic library (not supported) -Ce Compilation with emulated floating point opcodes -Cf<x> Select fpu instruction set to use; see fpc -i or fpc -if for possible values -CF<x> Minimal floating point constant precision (default, 32, 64) -Cg Generate PIC code -Ch<n>[,m] <n> bytes min heap size (between 1023 and 67107840) and optionally [m] max heap size -Ci IO-checking -Cn Omit linking stage -Co Check overflow of integer operations -CO Check for possible overflow of integer operations -Cp<x> Select instruction set; see fpc -i or fpc -ic for possible values -CP<x>=<y> packing settings -CPPACKSET=<y> <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8 -CPPACKENUM=<y> <y> enum packing: 0, 1, 2 and 4 or DEFAULT or NORMAL -CPPACKRECORD=<y> <y> record packing: 0 or DEFAULT or NORMAL, 1, 2, 4, 8, 16 and 32 -Cr Range checking -CR Verify object method call validity -Cs<n> Set stack checking size to <n> -Ct Stack checking (for testing only, see manual) -CT<x> Target-specific code generation options -CTcld Emit a CLD instruction before using the x86 string instructions -CX Create also smartlinked library -d<x> Defines the symbol <x> -D Generate a DEF file -Dd<x> Set description to <x> -Dv<x> Set DLL version to <x> -e<x> Set path to executable -E Same as -Cn -fPIC Same as -Cg -F<x> Set file names and paths: -Fa<x>[,y] (for a program) load units <x> and [y] before uses is parsed -Fc<x> Set input codepage to <x> -FC<x> Set RC compiler binary name to <x> -Fd Disable the compiler's internal directory cache -FD<x> Set the directory where to search for compiler utilities -Fe<x> Redirect error output to <x> -Ff<x> Add <x> to framework path (Darwin only) -FE<x> Set exe/unit output path to <x> -Fi<x> Add <x> to include path -Fl<x> Add <x> to library path -FL<x> Use <x> as dynamic linker -Fm<x> Load unicode conversion table from <x>.txt in the compiler dir -FM<x> Set the directory where to search for unicode binary files -FN<x> Add <x> to list of default unit scopes (namespaces) -Fo<x> Add <x> to object path -Fr<x> Load error message file <x> -FR<x> Set resource (.res) linker to <x> -Fu<x> Add <x> to unit path -FU<x> Set unit output path to <x>, overrides -FE -FW<x> Store generated whole-program optimization feedback in <x> -Fw<x> Load previously stored whole-program optimization feedback from <x> -g Generate debug information (default format for target) -gc Generate checks for pointers (experimental, only available on some targets, might generate false positive) -gh Use heaptrace unit (for memory leak/corruption debugging) -gl Use line info unit (show more info with backtraces) -gm Generate Microsoft CodeView debug information (experimental) -go<x> Set debug information options -godwarfsets Enable DWARF 'set' type debug information (breaks gdb < 6.5) -gostabsabsincludes Store absolute/full include file paths in Stabs -godwarfmethodclassprefix Prefix method names in DWARF with class name -godwarfcpp Simulate C++ debug information in DWARF -godwarfomflinnum Generate line number information in OMF LINNUM records in MS LINK format in addition to the DWARF debug information (Open Watcom Debugger/Linker compatibility) -gp Preserve case in stabs symbol names -gs Generate Stabs debug information -gt Trash local variables (to detect uninitialized uses; multiple 't' changes the trashing value) -gv Generates programs traceable with Valgrind -gw Generate DWARFv2 debug information (same as -gw2) -gw2 Generate DWARFv2 debug information -gw3 Generate DWARFv3 debug information -gw4 Generate DWARFv4 debug information (experimental) -i Information -iD Return compiler date -iSO Return compiler OS -iSP Return compiler host processor -iTO Return target OS -iTP Return target processor -iV Return short compiler version -iW Return full compiler version -ia Return list of supported ABI targets -ic Return list of supported CPU instruction sets -if Return list of supported FPU instruction sets -ii Return list of supported inline assembler modes -io Return list of supported optimizations -ir Return list of recognized compiler and RTL features -it Return list of supported targets -iu Return list of supported microcontroller types -iw Return list of supported whole program optimizations -I<x> Add <x> to include path -k<x> Pass <x> to the linker -l Write logo -M<x> Set language mode to <x> -Mfpc Free Pascal dialect (default) -Mobjfpc FPC mode with Object Pascal support -Mdelphi Delphi 7 compatibility mode -Mtp TP/BP 7.0 compatibility mode -Mmacpas Macintosh Pascal dialects compatibility mode -Miso ISO 7185 mode -Mextendedpascal ISO 10206 mode -Mdelphiunicode Delphi 2009 and later compatibility mode -n Do not read the default config files -o<x> Change the name of the executable produced to <x> -O<x> Optimizations: -O- Disable optimizations -O1 Level 1 optimizations (quick and debugger friendly) -O2 Level 2 optimizations (-O1 + quick optimizations) -O3 Level 3 optimizations (-O2 + slow optimizations) -O4 Level 4 optimizations (-O3 + optimizations which might have unexpected side effects) -Oa<x>=<y> Set alignment -Oo[NO]<x> Enable or disable optimizations; see fpc -i or fpc -io for possible values -Op<x> Set target cpu for optimizing; see fpc -i or fpc -ic for possible values -OW<x> Generate whole-program optimization feedback for optimization <x>; see fpc -i or fpc -iw for possible values -Ow<x> Perform whole-program optimization <x>; see fpc -i or fpc -iw for possible values -Os Optimize for size rather than speed -pg Generate profile code for gprof (defines FPC_PROFILE) -P<x> Target CPU / compiler related options: -PB Show default compiler binary -PP Show default target cpu -P<x> Set target CPU (aarch64,arm,avr,i386,i8086,jvm,m68k,mips,mipsel,powerpc,powerpc64,sparc,x86_64) -R<x> Assembler reading style: -Rdefault Use default assembler for target -Ratt Read AT&T style assembler -Rintel Read Intel style assembler -S<x> Syntax options: -S2 Same as -Mobjfpc -Sc Support operators like C (*=,+=,/= and -=) -Sa Turn on assertions -Sd Same as -Mdelphi -Se<x> Error options. <x> is a combination of the following: <n> : Compiler halts after the <n> errors (default is 1) w : Compiler also halts after warnings n : Compiler also halts after notes h : Compiler also halts after hints -Sf Enable certain features in compiler and RTL; see fpc -i or fpc -ir for possible values) -Sg Enable LABEL and GOTO (default in -Mtp and -Mdelphi) -Sh Use reference counted strings (ansistring by default) instead of shortstrings -Si Turn on inlining of procedures/functions declared as "inline" -Sj Allows typed constants to be writeable (default in all modes) -Sk Load fpcylix unit -SI<x> Set interface style to <x> -SIcom COM compatible interface (default) -SIcorba CORBA compatible interface -Sm Support macros like C (global) -So Same as -Mtp -Sr Transparent file names in ISO mode -Ss Constructor name must be init (destructor must be done) -Sv Support vector processing (use CPU vector extensions if available) -Sx Enable exception keywords (default in Delphi/ObjFPC modes) -Sy @<pointer> returns a typed pointer, same as $T+ -s Do not call assembler and linker -sh Generate script to link on host -st Generate script to link on target -sr Skip register allocation phase (use with -alr) -T<x> Target operating system: -Taros AROS -Tdarwin Darwin/Mac OS X -Tdragonfly DragonFly BSD -Tembedded Embedded -Tfreebsd FreeBSD -Tiphonesim iPhoneSimulator -Tlinux Linux -Tnetbsd NetBSD -Topenbsd OpenBSD -Tsolaris Solaris -Twin64 Win64 (64 bit Windows systems) -u<x> Undefines the symbol <x> -U Unit options: -Un Do not check where the unit name matches the file name -Ur Generate release unit files (never automatically recompiled) -Us Compile a system unit -v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default) 0 : Show nothing (except errors) w : Show warnings u : Show unit info n : Show notes t : Show tried/used files h : Show hints c : Show conditionals i : Show general info d : Show debug info l : Show linenumbers r : Rhide/GCC compatibility mode s : Show time stamps q : Show message numbers a : Show everything x : Show info about invoked tools b : Write file names messages p : Write tree.log with parse tree with full path v : Write fpcdebug.txt with z : Write output to stderr lots of debugging info m<x>,<y> : Do not show messages numbered <x> and <y> -V<x> Append '-<x>' to the used compiler binary name (e.g. for version) -W<x> Target-specific options (targets) -WA Specify native type application (Windows) -Wb Create a bundle instead of a library (Darwin) -WB Create a relocatable image (Windows) -WB<x> Set image base to <x> (Windows) -WC Specify console type application (Windows) -WD Use DEFFILE to export functions of DLL or EXE (Windows) -We Use external resources (Darwin) -WG Specify graphic type application (Windows) -Wi Use internal resources (Darwin) -WI Turn on/off the usage of import sections (Windows) -WM<x> Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwin) -WN Do not generate relocation code, needed for debugging (Windows) -WP<x> Minimum iOS deployment version: 8.0, 8.0.2, ... (iphonesim) -WR Generate relocation code (Windows) -WX Enable executable stack (Linux) -X Executable options: -X9 Generate linkerscript for GNU Binutils ld older than version 2.19.1 (Linux) -Xc Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux) -Xd Do not search default library path (sometimes required for cross-compiling when not using -XR) -Xe Use external linker -Xf Substitute pthread library name for linking (BSD) -Xg Create debuginfo in a separate file and add a debuglink section to executable -XD Try to link units dynamically (defines FPC_LINK_DYNAMIC) -Xi Use internal linker -XLA Define library substitutions for linking -XLO Define order of library linking -XLD Exclude default order of standard libraries -Xm Generate link map -XM<x> Set the name of the 'main' program routine (default is 'main') -Xn Use target system native linker instead of GNU ld (Solaris, AIX) -Xp<x> First search for the compiler binary in the directory <x> -XP<x> Prepend the binutils names with the prefix <x> -Xr<x> Set the linker's rlink-path to <x> (needed for cross compile, see the ld manual for more information) (BeOS, Linux) -XR<x> Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD, Linux, Mac OS, Solaris) -Xs Strip all symbols from executable -XS Try to link units statically (default, defines FPC_LINK_STATIC) -Xt Link with static libraries (-static is passed to linker) -Xv Generate table for Virtual Entry calls -XV Use VLink as external linker (default on Amiga, MorphOS) -XX Try to smartlink units (defines FPC_LINK_SMART) -? Show this help -h Shows this help without waiting
標準設定ファイル fpc.cfg |
---|
# # Config file generated by fpcmkcfg on 2024/07/29 - 10:12:37 # Example fpc.cfg for Free Pascal Compiler # # ---------------------- # Defines (preprocessor) # ---------------------- # # nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed # # -d is the same as #DEFINE # -u is the same as #UNDEF # # # Some examples (for switches see below, and the -? helppages) # # Try compiling with the -dRELEASE or -dDEBUG on the commandline # # For a release compile with optimizes and strip debuginfo #IFDEF RELEASE -O2 -Xs #WRITE Compiling Release Version #ENDIF # For a debug version compile with debuginfo and all codegeneration checks on #IFDEF DEBUG -gl -Crtoi #WRITE Compiling Debug Version #ELSE # Strip debuginfo from the executable if not in debug mode -Xs #ENDIF # assembling #ifdef darwin # use pipes instead of temporary files for assembling -ap #endif # ---------------- # Parsing switches # ---------------- # Pascal language mode # -Mfpc free pascal dialect (default) # -Mobjfpc switch some Delphi 2 extensions on # -Mdelphi tries to be Delphi compatible # -Mtp tries to be TP/BP 7.0 compatible # -Mgpc tries to be gpc compatible # -Mmacpas tries to be compatible to the macintosh pascal dialects # # Turn on Object Pascal extensions by default #-Mobjfpc # Assembler reader mode # -Rdefault use default assembler # -Ratt read AT&T style assembler # -Rintel read Intel style assembler # # All assembler blocks are AT&T styled by default #-Ratt # Semantic checking # -S2 same as -Mobjfpc # -Sc supports operators like C (*=,+=,/= and -=) # -Sa include assertion code. # -Sd same as -Mdelphi # -Se<x> error options. <x> is a combination of the following: # <n> : compiler stops after <n> errors (default is 1) # w : compiler stops also after warnings # n : compiler stops also after notes # h : compiler stops also after hints # -Sg allow LABEL and GOTO # -Sh Use ansistrings # -Si support C++ styled INLINE # -Sk load fpcylix unit # -SI<x> set interface style to <x> # -SIcom COM compatible interface (default) # -SIcorba CORBA compatible interface # -Sm support macros like C (global) # -So same as -Mtp # -Sp same as -Mgpc # -Ss constructor name must be init (destructor must be done) # -Sx enable exception keywords (default in Delphi/ObjFPC modes) # # Allow goto, inline, C-operators, C-vars -Sgic # --------------- # Code generation # --------------- # Uncomment the next line if you always want static/dynamic units by default # (can be overruled with -CD, -CS at the commandline) #-CS #-CD # Set the default heapsize to 8Mb #-Ch8000000 # Set default codegeneration checks (iocheck, overflow, range, stack) #-Ci #-Co #-Cr #-Ct # Optimizer switches # -Os generate smaller code # -Oa=N set alignment to N # -O1 level 1 optimizations (quick optimizations, debuggable) # -O2 level 2 optimizations (-O1 + optimizations which make debugging more difficult) # -O3 level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster) # -Oo<x> switch on optimalization x. See fpc -i for possible values # -OoNO<x> switch off optimalization x. See fpc -i for possible values # -Op<x> set target cpu for optimizing, see fpc -i for possible values #ifdef darwin #ifdef cpui386 -Cppentiumm -Oppentiumm #endif #endif # ----------------------- # Set Filenames and Paths # ----------------------- # Both slashes and backslashes are allowed in paths # path to the messagefile, not necessary anymore but can be used to override # the default language #-FrC:\FPC\3.2.2/msg/errore.msg #-FrC:\FPC\3.2.2/msg/errorn.msg #-FrC:\FPC\3.2.2/msg/errores.msg #-FrC:\FPC\3.2.2/msg/errord.msg #-FrC:\FPC\3.2.2/msg/errorr.msg # search path for unicode binary files (FPC 2.x does not know this switch) #ifndef VER2 -FMC:\FPC\3.2.2/unicode/ #endif # Search for $fpctarget/$fpcsubarch-$fpcmemorymodel/ subdirectory first # for i8086 CPU #ifdef cpui8086 -FuC:\FPC\3.2.2/units/$fpctarget/$fpcsubarch-$fpcmemorymodel -FuC:\FPC\3.2.2/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/* -FuC:\FPC\3.2.2/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl #endif # searchpath for units and other system dependent things -FuC:\FPC\3.2.2/units/$fpctarget -FuC:\FPC\3.2.2/units/$fpctarget/* -FuC:\FPC\3.2.2/units/$fpctarget/rtl #IFDEF FPCAPACHE_1_3 -FuC:\FPC\3.2.2/units/$fpctarget/httpd13/ #ELSE #IFDEF FPCAPACHE_2_0 -FuC:\FPC\3.2.2/units/$fpctarget/httpd20 #ELSE -FuC:\FPC\3.2.2/units/$fpctarget/httpd22 #ENDIF #ENDIF # searchpath for fppkg user-specific packages -Fu$LOCAL_APPDATA\FreePascal\fppkg/units/$FPCTARGET/* # searchpath for tools -FDC:\FPC\3.2.2/bin/$FPCTARGET # path to the gcclib # searchpath for libraries #-FlC:\FPC\3.2.2/lib #-Fl/lib;/usr/lib -FlC:\FPC\3.2.2/lib/$FPCTARGET #IFNDEF CPUI386 #IFNDEF CPUAMD64 #DEFINE NEEDCROSSBINUTILS #ENDIF #ENDIF #IFNDEF Win32 #DEFINE NEEDCROSSBINUTILS #ENDIF # never need cross-prefix when targeting the JVM # (no native compiler, always cross-compiling) #ifdef cpujvm #undef NEEDCROSSBINUTILS #endif # for android cross-prefix is set by compiler #ifdef android #undef NEEDCROSSBINUTILS #endif # never need cross-prefix when targeting the i8086 # (no native compiler, always cross-compiling) #ifdef cpui8086 #undef NEEDCROSSBINUTILS #endif # never need cross-prefix when targeting the i8086 # (no native compiler, always cross-compiling) #ifdef cpujvm #undef NEEDCROSSBINUTILS #endif # binutils prefix for cross compiling #IFDEF FPC_CROSSCOMPILING #IFDEF NEEDCROSSBINUTILS -XP$FPCTARGET- #ENDIF #ENDIF # ------------- # Linking # ------------- # generate always debugging information for GDB (slows down the compiling # process) # -gc generate checks for pointers # -gd use dbx # -gg use gsym # -gh use heap trace unit (for memory leak debugging) # -gl use line info unit to show more info for backtraces # -gv generates programs tracable with valgrind # -gw generate dwarf debugging info # # Enable debuginfo and use the line info unit by default #-gl # always pass an option to the linker #-k-s # Always use smartlinking on i8086, because the system unit exceeds the 64kb # code limit #ifdef cpui8086 -CX -XX #endif # ------------- # Miscellaneous # ------------- # Write always a nice FPC logo ;) -l # Verbosity # e : Show errors (default) d : Show debug info # w : Show warnings u : Show unit info # n : Show notes t : Show tried/used files # h : Show hints s : Show time stamps # i : Show general info q : Show message numbers # l : Show linenumbers c : Show conditionals # a : Show everything 0 : Show nothing (except errors) # b : Write file names messages r : Rhide/GCC compatibility mode # with full path x : Executable info (Win32 only) # v : write fpcdebug.txt with p : Write tree.log with parse tree # lots of debugging info # # Display Info, Warnings and Notes -viwn # If you don't want so much verbosity use #-vw
C:\PG>CD FreePascal\Hello
C:\PG\FreePascal\Hello>fpc64 -dDEBUG Hello.pas
Compiling Debug Version
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling Hello.pas
Linking Hello.pas
14 lines compiled, 0.1 sec, 72688 bytes code, 5252 bytes data
C:\PG\FreePascal\Hello>
# # Try compiling with the -dRELEASE or -dDEBUG on the commandline # # For a release compile with optimizes and strip debuginfo #IFDEF RELEASE -O2 -Xs #WRITE Compiling Release Version #ENDIF # For a debug version compile with debuginfo and all codegeneration checks on #IFDEF DEBUG -gl -Crtoi #WRITE Compiling Debug Version #ELSE # Strip debuginfo from the executable if not in debug mode -Xs #ENDIF
標準設定ファイル fpc.cfg の検索 |
---|
独自設定ファイル |
---|
# # マイ設定 # #WRITE myfpc.cfg # スタックチェックを無効にする。 -Ct- # C演算子 *=,+=,/=,-= を無効にする。 -Sc-
C:\PG>CD FreePascal\Hello
C:\PG\FreePascal\Hello>fpc64 @myfpc.cfg Hello.pas
myfpc.cfg
Free Pascal Compiler version 3.2.2 [2021/05/15] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling Hello.pas
Linking Hello.exe
14 lines compiled, 0.1 sec, 85680 bytes code, 5300 bytes data
C:C:\PG\FreePascal\Hello>
C:\PG>CD FreePascal\Hello
C:\PG\FreePascal\Hello>fpc64 @myfpc.cfg -n Hello.pas
myfpc.cfg
Fatal: Can't find unit system used by Hello
Fatal: Compilation aborted
Error: C:\FPC\3.2.2\bin\i386-win32\ppcrossx64.exe returned an error exitcode
C:\PG\FreePascal\Hello>
標準設定ファイル fpc.cfg の再作成 |
---|
C:\PG>CD FreePascal
C:\PG\FreePascal>C:\FPC\3.2.2\bin\i386-win32\fpcmkcfg -d basepath=C:\FPC\3.2.2 -d sharepath=C:\FPC\3.2.2 -o fpc.cfg
C:\PG\FreePascal>
C:\PG>CD FreePascal
C:\PG\FreePascal>C:\FPC\3.2.2\bin\i386-win32\fpcmkcfg -d basepath=C:\FPC\3.2.2 -d sharepath=C:\FPC\3.2.2 -o myfpc.cfg
C:\PG\FreePascal>