slice2cpp (1) - Linux Manuals

slice2cpp: The Slice to C++ compiler.


slice2cpp - The Slice to C++ compiler.


slice2cpp [options] [files]


slice2cpp compiles Slice files to C++.

Full documentation for slice2cpp is available online at:


-h, --help

Displays help message.

-v, --version
Displays the compiler version.


Defines the preprocessor symbol NAME.


Defines the preprocessor symbol NAME with the value DEF.


Undefines the preprocessor symbol NAME.


Add the directory DIR to the search path for #include directives.


Print the preprocessor output on stdout.

--output-dir DIR

Place the generated files into directory DIR.

-d, --debug

Print debug information showing the operation of the Slice parser.


Permit use of the normally reserved prefix Ice for identifiers. Use this option only when compiling the source code for the Ice run time.


Permit use of underscores in Slice identifiers.

--header-ext EXT

Changes the file extension for the generated header files from the default h to EXT.

--source-ext EXT

Changes the file extension for the generated source files from the default cpp to EXT.

--add-header HDR[,GUARD]

This option adds an include directive for the specified header at the beginning of the generated source file (preceding any other include directives). If GUARD is specified, the include directive is protected by the specified guard.

--include-dir DIR

Modifies #include directives in source files to prepend the path name of each header file with the directory DIR.


Generate sample implementation files. This option will not overwrite an existing file.

Prints makefile dependency information to standard output.

--dll-export SYMBOL

Use SYMBOL to control DLL exports or imports. This option allows you to selectively export or import global symbols in the generated code.


Generate checksums for Slice definitions.


Generate streaming helper functions for Slice types.