Ice provides two distinct C++ mappings:
This chapter describes the C++11 mapping.
slice2cpp, the Slice-to-C++ translator, always generates code for both mappings, and C++ headers files provided by Ice, such as Ice/Ice.h
and IceGrid/IceGrid.h
, can be used with either mapping.
You select the C++11 mapping by compiling all your code with -DICE_CPP11_MAPPING
. This macro should be defined in your build projects, not in your source files.
You also need to link your application with the ++11
variant of the Ice libraries, for example:
$ c++ -o client Hello.cpp client.cpp -DICE_CPP11_MAPPING -lIce++11.so |
The Ice C++11 and Ice C++98 libraries are built from the same source code, in ice/cpp. The resulting C++ libraries are nevertheless language mapping specific: |