Component Pascal compiler Wiki
Status: Alpha
Brought to you by:
romiras
This document is a draft version.
For example, we create a module Hello what is part of subsystem Priv (e.g. it located at path Priv/Mod/Hello.cp).
Hello.cp
MODULE PrivHello; IMPORT Out; BEGIN Out.String ("Hello world!"); Out.Ln END PrivHello.
[Project] Name=<project name> [Compiler] Modules=<ModuleName1 ModuleName2 ModuleNameN> Options=<compiler options> [Linker] InterfaceModules=<list of modules, like: Kernel$+ Math Strings Console WinConsole HostInit Init Out Hello#> OutputMode=<name of output file e.g. demo.exe, mpeg4.plg, libexport.so>
Default compiler options are {checks, assert, obj, ref, allref, srcpos, signatures}.
CompilerOptions is a combination of options in one string. Valid characters are '-', '!', '+', '$', '?' and '@'.
All paths are relative to root directory of all subsystems.
In order to build program for native OS you need create a project document for module "PrivHello".
Hello.prj
[Project] Name=<project name> [Compiler] Modules=PrivHello Options=<compiler options> [Linker] InterfaceModules=Kernel$+ Math Strings Console WinConsole HostInit Init Out PrivHello OutputMode=Exe OutputFile=hello.exe