#include
the client stubs declared in
the *C.h file and the skeletons in the *S.h file in
your code.
Environment Variables
TAO_IDL looks for two environment variables CPP_LOCATION
and TAO_IDL_DEFAULT_CPP_FLAGS
. TAO_IDL doesn't
implements its own preprocessor and it borrows the preprocessor of
the compiler of your choice to perform the preprocessing work.
On most platform TAO's makefiles can locate the compiler
automatically. However, on NT and some other situation (like cross
compiling,) you need to instruct which specific compiler to use.
CPP_LOCATION
allows you to achieve this. It holds the
program name of the compiler that TAO_IDL uses. This should be a full
pathname if the compiler is not within your $PATH
.
TAO_IDL also defines a set of default command line options passed to
the preprocessor depending on which platform TAO_IDL is compiled. The
environment variable TAO_IDL_DEFAULT_CPP_FLAGS
allows you
to alter the command line optiona passed to the preprocessor. You can
use it to alter the default options for the preprocessor and specify
things like include directories and how the preprocessor is invoked.
Two flags that won't get overwritten by the environment variable are
-DIDL
and -I.
. They are always passed to
the preprocessor.
If your IDLs need to include <orb.idl>
, then you need to
define either/both ACE_ROOT
or/and TAO_ROOT
. If you
already have ACE_ROOT
defined, TAO_IDL can figure
TAO_ROOT
out if your ACE/TAO was installed using default directory
structure, otherwise, you'll need to define TAO_ROOT
.
To configure TAO's IDL compiler to support perfect hashing please do the following:
ACE_HAS_GPERF
when building ACE and TAO.
This macro has been defined for the platforms where gperf
has been tested, which includes most platforms
that ACE runs on.
gperf
in $ACE_ROOT/apps/gperf. This build
also leaves a copy/link of the gperf program at the $ACE_ROOT/bin
directory.
-g
option for the TAO IDL compiler or set
your search path accordingly to install gperf
in a
directory other than $ACE_ROOT/bin.
-Gp
' and '-Gd
' flags at the same time) and defer the
determination of collocation strategy until run-time. On the other
hand, if you want to minimize the footprint of your program, you might
want to pre-determine the collocation strategy you want and only
generate the right collocated stubs (or not generating any at all using
both '-Sp
' and '-Sd
' flags at the same time if
it's a pure client.) See our collocation
paper for a detail discussion on the collocation support in
TAO.
Option | Description | Remark |
---|---|---|
-u | The compiler prints out the options that are given below and exits clean | |
-V | The compiler printouts its version and exits | |
-Wb,option_list | Pass options to the TAO IDL compiler backend. | |
skel_export_macro=macro_name | The compiler will emit macro_name right after each class or extern keyword in the generated skeleton code (S files,) this is needed for Windows/NT that requires special directives to export symbols from DLLs, usually the definition is just a space on unix platforms. | |
skel_export_include=include_path | The compiler will generate code to include include_path at the top of the generated server header, this is usually a good place to define the server side export macro. | |
stub_export_macro=macro_name | The compiler will emit macro_name right after each class or extern keyword in the generated stub code, this is needed for Windows/NT that requires special directives to export symbols from DLLs, usually the definition is just a space on unix platforms. | |
stub_export_include=include_path | The compiler will generate code to include include_path at the top of the client header, this is usually a good place to define the export macro. | |
export_macro=macro_name | This option has the same effect as issuing -Wb,skel_export_macro=macro_name -Wb,stub_export_macro=macro_name. This option is useful when building a DLL containing both stubs and skeletons. | |
export_include=include_path | This option has the same effect as specifying -Wb,stub_export_include=include_path. This option goes with the previous option to build DLL containing both stubs and skeletons. | |
pch_include=include_path | The compiler will generate code to include include_path at the top of all TAO IDL compiler generated files. This can be used with a precompiled header mechanism, such as those provided by Borland C++Builder or MSVC++. | |
-E | Only invoke the preprocessor | |
-Wp,option_list | Pass options to the preprocessor. | |
-Dmacro_definition | It is passed to the preprocessor | |
-Umacro_name | It is passed to the preprocessor | |
-Iinclude_path | It is passed to the preprocessor | |
-Aassertion | It is passed to the preprocessor | |
-Y | It is passed to the preprocessor | |
-H perfect_hash | To specify the IDL compiler to generate skelton code that uses perfect hashed operation demuxing strategy, which is the default strategy. Perfect hashing uses gperf program, to generate demuxing methods. | |
-H dynamic_hash | To specify the IDL compiler to generate skelton code that uses dynamic hashed operation demuxing strategy. | |
-H binary_search | To specify the IDL compiler to generate skelton code that uses binary search based operation demuxing strategy. | |
-H linear_search | To specify the IDL compiler to generate skelton code that uses linear search based operation demuxing strategy. Note that this option is for testing purposes only and should not be used for production code since it's inefficient. | |
-in | To generate #include statements with <>'s for the standard include files (e.g. tao/corba.h) indicating them as non-changing files | |
-ic | To generate #include statements with ""s for changing standard include files (e.g. tao/corba.h). | |
-g | To specify the path for the perfect hasing program (GPERF). Default is $ACE_ROOT/bin/gperf. | |
-o | To specify the output directory to IDL compiler as to where all the
IDL-compiler-generated files are to be put. By default, all the files are
put in the current directory from where |
|
-hc | Client's header file name ending. Default is "C.h". | |
-hs | Server's header file name ending. Default is "S.h". | |
-hT | Server's template header file name ending. Default is "S_T.h". | |
-cs | Client stub's file name ending. Default is "C.cpp". | |
-ci | Client inline file name ending. Default is "C.i". | |
-ss | Server skeleton file name ending. Default is "S.cpp". | |
-sT | Server template skeleton file name ending. Default is "S_T.cpp". | |
-si | Server inline skeleton file name ending. Default is "S.i". | |
-st | Server's template inline file name ending. Default is "S_T.i". | |
-t | Temporary directory to be used by the IDL compiler. Default : Resolve ACE_DEFAULT_TEMP_DIR_ENV. If it is not defined, choose /tmp/. | |
-Cw | Output a warning if two identifiers in the same scope differ in spelling only by case (default for now). | |
-Ce | Output an error if two indentifiers in the same scope differ in spelling only by case. Default output is warning (for now). | Since there is at least one OMG IDL file (sfp.idl, part of the AVStreams specification) that is inconsistent with its own spelling rule, we have made a warning the default output until the issue is resolved. |
-Gc | Generate stubs and skeletons using compiled marshaling | |
-Gi | Generate stubs and skeletons using interpretive marshaling (default for now) | |
-Ge flag | If the value of the flag is 0, tao_idl will generate code that will use native C++ exceptions. If the value of the flag is 1, tao_idl will generate code that will use environment variable for passing exceptions | |
-Gp | Generated collocated stubs that use Thru_POA collocation strategy (default) |
|
-Gd | Generated collocated stubs that use Direct collocation strategy |
|
-Gt | Generate optimized TypeCodes (unimplemented as yet) | |
-Gv | Generate code that suppports Object-By-Value | |
-GI | Generate templates files for the servant implementation | |
-GIh arg | Servant implemenation header file name ending | |
-GIs arg | Servant implemenation skeleton file name ending | |
-GIb arg | Prefix to the implementation class names | |
-GIe arg | Suffix to the implementation class names | |
-GIc arg | Generate copy constructors in the servant implementation template files | |
-Sa | Suppress generation of the Any operators | |
-Sp | Suppress generation of collocated stubs that use Thru_POA collocation strategy |
|
-Sd | Suppress generation of collocated stubs that use Direct collocation strategy (default) |
|
-St | Suppress generation of the TypeCodes |
Back to the TAO documentation.