6.2. Options

Any of the CLIP compiler options described below can be placed in the .cliprc file in the current directory; or in the $HOME/.cliprc file; or in any file in the $CLIPROOT/cliprc directory. For example, you could create a file .cliprc in your home directory with the following content:


It results in compiling with -r -l -Scp866 options, even if you don't specify them explicitly.

The list of options follows.

-h, --help

display a short usage help and exit

-H, --help-environment

display a short help about acceptable environment variables and exit; see more detailed information in the chapter Environment variables

-V, --version

display CLIP compiler version and exit

-v[<level>], --verbose[=<level>]

set/increase verbose level; possible values of <level> are from 0 (silent) to 6 (most verbose); default is 1

-a, --auto-memvar[=1|0]

declare any variable included in a PRIVATE, PUBLIC, or PARAMETERS statement as MEMVAR

-w, --namespace-warning[=1|0]

generate warning messages for undeclared or unaliased (ambiguous) variable references

-e, --exec

generate executable file

-c, --compile

stop after generation C code

-g,-b, --debug[=1|0]

include debugging information in the object file

-t, --show-syntax-tree

print generated program syntax tree

-o<name>, --output=<name>

place executable in file <name>

-d<name>, --outdir=<name>

define the location of the output object files

-O, --optimise[=<val>]

set optimisation level for C compiler

-M, --main

use the code of the first file in the file list as a program start point (automatic definition of the MAIN procedure)

-n, --nomain

suppress the automatic definition of a procedure with the same name as the program file (.prg)

-p, --pcode

generate pseudocode (P-code) module; see Load() function description

-l, --c-pcode

compile in C+P-code mode; smaller size of an output file, either an object or an executable

-s, --shared

create an shared object; when used with -e option it results in linking with shared run-time library (libclip.so), which gives a smaller size executable; see -r option

-r, --shared-exec

always when possible link with shared libraries; smaller size of an executable

-I<path>, --include-path=<path>

add the specified directory to the INCLUDE path list

-L<path>, --library-path=<path>

add the specified directory to the list of path that CLIP will search for libraries

-D<name>, --define=<name>

define macro <name>

-D<name=value>, --define=<name=value>

define macro <name> as <value>

-U[<filename>], --use-std-ch[=<filename>]

identifies an alternate standard header file to preprocess in place of the supplied STD.CH which is used automatically

-S<charset>, --source-charset=<charset>

define charset of the string constants used in the source files (.prg); CLIP_HOSTCS environment variable is used by default; see chapter Environment variables for details

-T<charet>, --target-charset=<charset>

define charset of the string constants to be used for an application's output; CLIP_HOSTCS environment variable is used by default; see chapter Environment variables for details

-P, --preprocess

stop after the preprocessing stage; the output is preprocessed source code, which is sent to the standard output

-C, --show-command

print command definitions at the preprocessing stage

-R, --noremove-c

do not remove temporary '.c' files

-N, --names

generate warnings about unresolved function names; see CLIP_NAMES environment variable description in the chapter Environment variable


Don`t use shared libraries, ignore -r -s switches, include all CLIP or system libraries to executable file.

-E<name>=<value>, --environment=<name>=<value>

set <name> environment variable's value to <value> for a compilation time

-q <word>, --compat=<word>

set syntax compatability mode; possible values:

  • no-as-word - AS clause in variables definitions is not acceptable; it's default behavior

  • as-word - AS clause in variables defintions is acceptable