Menu

CompilingProject

Romiras
There is a newer version of this page. You can find it here.

Note

This document is a draft version.

Sample Hello module

Hello.cp

MODULE Hello;
IMPORT Out;
BEGIN
  Out.String ("Hello world!");  Out.Ln
END Hello.

Project

Template for project

[Project]
ProjectName=<project name>

[Compiler]
Module=<relative path to module>
CompilerOptions=<compiler options>

[Linker]
LinkedModules=<list of modules, like: Kernel$+ Math Strings Console WinConsole HostInit Init Out Hello#>
OutputMode=<name of output file>

Parameters

CompilerOptions

CompilerOptions is a combination of options in one string. Valid characters are '-', '!', '+', '$', '?' and '@'.

  • - - (no description yet)
  • ! - (no description yet)
  • + - all checks
  • ? - hint
  • @ - error trap
  • $ - oberon

Default compiler options are {checks, assert, obj, ref, allref, srcpos, signatures}.

Paths

All paths are relative to root directory of all subsystems.

Sample Project

In order to build program for native system you need create a project document for module "Hello".

Hello.prj

[Project]
ProjectName=hello

[Compiler]
Module=Examples/Mod/Hello.cp
CompilerOptions=

[Linker]
LinkedModules=Kernel$+ Math Strings Console WinConsole HostInit Init Out Hello#
OutputMode=Exe
OutputFile=hello.exe

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.