occ1
Openc++ compiler
Usage
occ [-g]
[-M
option=value]
[-l]
[-S
metaclass]
[-s]
[-V]
[-v]
[-w]
[-n]
[-p]
[-E]
[-c]
[-P]
[-m
file_name]
[-I
directory]
[-D
name=def]
[-d
option]
[-C]
[--regular-c++]
[--
C++
compiler
options]
source_file
Overview
occ applying a meta-level program to an OpenC++ program, and compiles the result program.
Full documentation can be found in /usr/share/doc/openc++.
Options
Main options
-
-g -
Produce debugging information.
-
-M option=value -
Specify an option with value. It is passed to metaobjects.
-
-l -
Print the list of statically loaded metaclasses.
-
-S metaclass -
Load a metaclass.
-
-s -
Print the whole parse tree of the given source program. Don't perform translation or compilation. If no source file is given,
occreads from the standard input.
-
-V -
Show the version number.
-
-v -
Specify the verbose mode.
-
-w -
Enable wide characters support.
Building stages options
-
-n -
Suppress invoking the preprocessor.
-
-p -
Stop after the parsing stage. No translation is done.
-
-E -
Don't run the back-end C++ compiler. Stop after generating a .ii file.
-
-c -
Suppress linking and produce a .o file.
-
-P -
Preprocess again after translation.
-
-m file_name -
Produce a shared library (a .so file). This is used to compile a metaclass. If file_name is specified, the name of the shared library is file_name.so. If the
-coption is specified together,occproduces a .so file, which should be linked by the user to be a shared library.
Preprocessor options
-
-I directory -
Add a directory to the search path of the #include directive.
-
-D name=def -
Define a macro name as def.
-
-d option -
Specify a preprocessor option
-
-C -
Don't discard comments
Other options
-
--regular-c++ -
Inhibit the extended syntax. This enables the keyword metaclass to be used as a variable name. This option is useful when parsing legacy code being not intended to translation. When this option is used, the symbol __opencxx is not defined.
-
-- -
The following options are interpreted as options for the back-end C++ compiler. For example, if you type:
% occ -I.. -- -g foo.c
Then the
-goption is passed to the C++ compiler. Note that these options are not passed to the C++ preprocessor. The-Dand-Ioptions need to be placed before--.
Files
file.{cc,C,c,cpp,cxx,mc} source file.
file.occ output file after C++ preprocessing.
file.ii output file after translation.
file.o object file.
file.so shared library dynamically loaded by occ.
/usr/lib/libocc.so library to link with meta-level program.
Notes
While the C++ processor is running, the macro __opencxx is predefined.
The programs compiled by occ do not need any runtime libraries or a garbage collector unless the meta-level program requires them at the base level.
Releases
4 releases since Debian 2.1 (Slink); the text changed 1 time.
-- since Debian 3.1 (Sarge);
--regular-c++ since Debian 3.1 (Sarge);
-C since Debian 3.1 (Sarge);
-D since Debian 3.1 (Sarge);
-E since Debian 3.1 (Sarge);
-I since Debian 3.1 (Sarge);
-M since Debian 3.1 (Sarge);
-P since Debian 3.1 (Sarge);
-S since Debian 3.1 (Sarge);
-V since Debian 3.1 (Sarge);
-c since Debian 3.1 (Sarge);
-d since Debian 3.1 (Sarge);
-g since Debian 3.1 (Sarge);
-l since Debian 3.1 (Sarge);
-m since Debian 3.1 (Sarge);
-n since Debian 3.1 (Sarge);
-p since Debian 3.1 (Sarge);
-s since Debian 3.1 (Sarge);
-v since Debian 3.1 (Sarge);
-w since Debian 3.1 (Sarge).