cc -I${HOME}/sybasec8/server/sdk/c/include \
-o libmma.so \
-L${HOME}/sybasec8/server/sdk/c/lib/ \
-lc8_sdk_server_lib -lnspr4 -lplc4 -llibxml2\
-fPIC \
-shared \
mma.cpp
where mma.c is the name of your source code file and libmma.so is the name you'd like to use for the library file.
-I specifies the directory(s) to be searched for #include files.
-o specifies the name of the output file. Typically, this is a shared library file.
-L specifies the directory(s) to search for library files that need to be linked with this one.
-l specifies the names of the Sybase CEP libraries to link with to use the Sybase CEP functions.
-fPIC specifies that the compiler should generate Position-Independent Code for dynamic linking.
-shared specifies that the output will be a shared object library file as opposed to a stand-alone executable program.