The Slice-to-Objective-C compiler,
slice2objc, offers the following command-line options in addition to the standard options:
#importdirectives in source files to prepend the path name of each header file with the directory
MACROto control the export of symbols from dynamic shared libraries. This option allows you to export symbols from the generated code and place such generated code in a shared library. Compiling a Slice definition with:
adds the provided
WIDGET_APIin our example) to the declaration of interfaces and protocols that need to be exported.
The generated code also defines the provided MACROas
This option is useful when you create a shared library and compile your Objective-C code with
-fvisibility=hiddento reduce the number of symbols exported.