Reflective# Compiler Flags and parameters:

The reflc compiler (standard command-line compiler) supports both inline parameters and parameter files.

Inline parameters:
The standard way of passing parameters to any command line app, Ex.:
reflc -output a.exe -flag1 true -flag2 false -source Foo.refl //.refl is the standard Reflective# file extension.

Parameter files: //Parameter files are NOT makefiles or project files.
Create a new standard text file with the contents:
source = Foo.refl //For multiple sources use source = Foo1.refl, Foo2.refl, abc.refl, sample.cs
output = a.exe
flag1 = true
flag2 = false
and save as test.par (the name and the extension doesn't really matter)
then in your command line do:
reflc -parfile test.par

The Parameter file notation is specially useful in large projects.

Parameters and flags:

(in parameter file notation)
  • source (required)
    • The source file(s) in which the compiler will operate.
    • usage: source = file.extension for multiple files: source = file.extension, file2.extension, *.extension2
  • output (optional)
    • the name with extension of the compiled result. Defaults to the filename of the first source with the extension corresponding to the output format.
    • usage: output = file.extension ex.: output = test.exe
  • outputformat (optional)
    • the format of the binary produced. Can be: IL, Win(PE) or ELF. Defaults to IL if not specified. IL is the default .NET executable format, which is not fully compiled. Win is the portable-executable native windows format, and ELF is the native UNIX format.
    • usage: outputformat = il | win32 | win64 | elf32 | elf64 ex.: outputformat = elf32
  • debug (optional)
    • Indicates if the resulting binary is a debub binary, by compiling #log statements, setting the #define DEBUG and others. Defaults to false.
    • usage: debug = true | false ex.: debug = true
  • logmode (optional)
    • indicates what should be used to display #log statements. mbox will display a message box, console will write to the console, and debugger will send to the debugger. Defaults to debugger.
    • usage: logmode = console | mbox | debugger ex.: logmode = console
  • autobignum (optional)
    • indicate wheter the preprocessor should use big numbers instead of normal types. This flag can have the values: none, integers, decimals and all. defaults to none. Dont use this unless you know you are doing, as a type mismatches are very likely. If set to integers all integer declarations (Int16, Int32 and Int64) will be converted to xInt (arbitrary big integer, only limited by memory). if set to decimals all decimal declarations (float, double, decimal) will be converted to xDecimal (arbitrary size and precision) declarations. if set to all integers will become xInt's and decimals will become xDecimal. If set to none nothing is changed.
    • usage: autobignum = none | integers | decimals | all ex.: autobignum = decimals
  • dynamic (optional)
    • Indicates wheter var statements should be processed at compile time (C#-Like) or should instatiate dynamic variables. If set to true var x; will instantiate a variable of type dynamic (from DLR) with name x.
    • usage: dynamic = true | false ex.: dynamic = false

Last edited Feb 18, 2012 at 5:24 PM by matheus2740, version 8


No comments yet.