1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
.\" slice2cppe.1 --
.\" Created: Thu, 15 Dec 2005 22:09:31 +0100
.\"
.TH SLICE2CPPE "1" "2005-12-15" "Slice2cppe 1.2" "ZeroC Ice"
.SH NAME
slice2cppe \- translate Slice to IceE for C++ (embedded edition)
.SH SYNOPSIS
.B slice2cppe [OPTIONS]... FILES...
.SH DESCRIPTION
Slice to C++ compiler that generates code suitable for the embedded edition
of Ice for C++.
.SH OPTIONS
Regardless of which Slice compiler you use, a number of command-line options are
common to the compilers for any language mapping. The common command-line options are:
.TP
.B \-h, \-\-help
Displays a help message.
.TP
.B \-v, \-\-version
Displays the compiler version.
.TP
.B \-DNAME
Defines the preprocessor symbol NAME.
.TP
.B \-DNAME=DEF
Defines the preprocessor symbol NAME with the value DEF.
.TP
.B \-UNAME
Undefines the preprocessor symbol NAME.
.TP
.B \-IDIR
Add the directory DIR to the search path for #include directives.
.P
The following options are specific to
.B slice2cppe.
.TP
.B \-\-header\-ext EXT
Changes the file extension for the generated header files from the default h to
the extension specified by EXT.
.TP
.B \-\-source\-ext EXT
Changes the file extension for the generated source files from the default cpp
to the extension specified by EXT.
.TP
.B \-\-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. For
example, \-\-add\-header precompiled.h,__PRECOMPILED_H__
results in the following directives at the beginning of the generated source file:
.B #ifndef __PRECOMPILED_H__
.br
.B #define __PRECOMPILED_H__
.br
.B #include <precompiled.h>
.br
.B #endif
The option can be repeated to create include directives for several files.
As suggested by the preceding example, this option is useful mainly to integrate
the generated code with a compiler's precompiled header mechanism.
.TP
.B \-\-impl
Generate sample implementation files. This option will not overwrite an
existing file.
.TP
.B \-\-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. As an
example, compiling a Slice definition with
.B $ slice2cpp \-\-dll\-export ENABLE_DLL x.ice
results in the following additional code being generated into x.h:
.B #ifndef ENABLE_DLL
.br
.B # ifdef ENABLE_DLL_EXPORTS
.br
.B # define ENABLE_DLL ICE_DECLSPEC_EXPORT
.br
.B # else
.br
.B # define ENABLE_DLL ICE_DECLSPEC_IMPORT
.br
.B # endif
.br
.B #endif
ICE_DECLSPEC_EXPORT and ICE_DECLSPEC_IMPORT are platform-
specific macros. For example, for Windows, they are defined as
__declspec(dllexport) and __declspec(dllimport), respectively;
for Solaris using CC version 5.5 or later, ICE_DECLSPEC_EXPORT is
defined as __global, and ICE_DECLSPEC_IMPORT is empty.
The symbol name you specify on the command line (ENABLE_DLL in this
example) is used by the generated code to export or import any symbols that
must be visible to code outside the generated compilation unit. The net effect
is that, if you want to create a DLL that includes x.cpp, but also want to use
the generated types in compilation units outside the DLL, you can arrange for
the relevant symbols to be exported by compiling x.cpp with
-DENABLE_DLL_EXPORTS.
.SH COPYRIGHT
Copyright (C) 2003-2006 ZeroC, Inc.
This is free software distributed under the GNU GPL. See
/usr/share/doc/slice2cppe/copyright for specific
conditions.
.SH SEE ALSO
Further information is available in the book
.I Distributed Programming with Ice
by Michi Henning, Mark Spruiell, et al. available as a PDF file in
non-free package
.B zeroc\-ice\-manual.
|