IDE Window: Compiler Options/ja

From Free Pascal wiki
Revision as of 11:05, 2 July 2015 by FTurtle (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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

Paths

  • 相対パスはプジェクトまたはパッケージのディレクトリ(.lpiや.lpkのあるディレクトリ)を基準に展開されます。
  • これらのパスはサーチパスに含まれ、検索されます。
  • 一方、サーチパスから特定のパスを除外する方法はありません。
  • パッケージまたはプジェクトがあるパッケージを使用する場合、それが利用していたサーチパスも受け継がれます。他のパッケージから引き継いだサーチパスは #Inherited ページにあります。
  • Lazarus のパッケージシステムを利用する場合、手動でサーチパスを設定する必要はまずありません。
  • FreePascal コンパイラにも独自の設定ファイルがあります(デフォルトでは /etc/fpc.cfg)。このファイルには一連のサーチパスが定義されています。RTL または 'classes', 'sysutils' といった FCL の FPCユニットを参考にして下さい。
  • サーチパスはセミコロン ';' で区切ります。
  • 前後の空白は無視されます。
  • $(TargetCPU)のようなマクロが使えます。IDE Macros in paths and filenames 参照。

Other Unit Files

プロジェクトまたはパッケージの Pascal ユニット(.ppu, .pp, .pas, .p) のサーチパスです。どのプロジェクト/パッケージのものかはウィンドウのタイトルをご覧下さい。このパスは FreePascal コンパイラに渡され、ユニットのパスに追加されます。

  • プロジェクト/パッケージに対するユニットの追加・除去を行うと、ユニットパスは自動的に修正されます。
  • 注意: パッケージが .ppu ファイル用に独立した出力ディレクトリを用いている場合は、このパスにソースのディレクトリを加えてはいけません。さもないと、FPC はパッケージの .ppuファイルをリビルドし、それをプロジェクトディレクトリに置いてしまいます。結果として複数のバージョンの .ppu ができ、'Can not find unit' (ユニットが見つからない) といった不思議なエラーメッセージを受け取るなど、面倒なことになります。例えば、FPCやLazarusのソース(.pas や .pp)が入ったディレクトリをここに追加してはいけません。

Include Files

インクルードファイル( .inc, .lrs files)のサーチパスです。ここに指定したパスは、コンパイラ指令 {$I filename.inc} または {$INCLUDE filename.inc} によって指定される Include Path に付け加える形で FreePascal コンパイラに渡されます。

Other sources

ここには Pascal ユニットのソースに対するサーチパスを指定しますが、このパスはコンパイラには渡されず、もっぱら IDE によって用いられます。

例: あるソースとそれに対応する .ppu を別のディレクトリに置いてあるとします。ここで.ppuのディレクトリを 'Other Unit Files' に、.pasのディレクトリを 'Other sources' パスに加えます。すると、コンパイラは .ppu ファイルを使え、しかもそれを毎度毎度リビルドしようとはしません。しかも、IDE からはソースファイルが見えますので、Find Declaration 機能が使えます。

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.

Parsing

See Free Pascal - Online documentation

Syntax mode

Choose the default mode. If a unit does not contain a {$mode somemode} directive, this is used as the default.

See Free Pascal - Online documentation


Syntax Options

  • C Style Operators (*=, +=, /= and -=)
  • Include Assertion Code
  • Allow LABEL and GOTO
  • C++ Styled INLINE
  • C Style Macros (global)
  • Constructor name must be init (destructor must be done)
  • Static Keyword in Objects
  • Use Ansi Strings

Assembler style

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

Code

See Free Pascal - Online documentation

Linking

See Free Pascal - Online documentation

Messages

See Free Pascal - Online documentation. Note that adding a lot of verbosity slows down the parsing of the compiler output much, even if most of the messages will be hidden in the messages view.

Other

See Free Pascal - Online documentation

Inherited

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

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.

Buttons

Test

This will run various test and detects common configurations mistakes. For fpc 2.2.0 it will warn about some double units. The warnings are correct, but you can ignore them, if you don't use these units.

Show Options

Opens a dialog and presents the current command line parameters.

Load/Save

Opens a dialog to save and/or load the current compiler options from/to a xml file.

Ok

This will apply the changes and then exit the dialog.

Cancel

This will undo all changes and exits the dialog.