Use compile and link switches when building dynamically linkable libraries for any user-defined function.
A UDF dynamically linkable library must include an implementation of the function extfn_use_new_api(). The source code for this function is in Setting the dynamic library interface. This function informs the server of the API style that all functions in the library adhere to. The sample source file my_main.cxx contains this function; you can use it without modification.
A UDF dynamically linkable library must also contain object code for at least one UDF function. A UDF dynamically linkable library may optionally contain multiple UDFs.
Link together the object code for each UDF as well as the extfn_use_new_api() to form a single library.
For example, to build the library "libudfex:"
Compile each source file to produce an object file:
my_main.cxx my_bit_or.cxx my_bit_xor.cxx my_interpolate.cxx my_plus.cxx my_plus_counter.cxx my_sum.cxx my_byte_length.cxx my_md5.cxx my_toupper.cxx
Link together each object produced into a single library.
After the dynamically linkable library has been compiled and linked, complete one of these tasks:
On UNIX modify the LD_LIBRARY_PATH within the start_iq startup script. While LD_LIBRARY_PATH is universal to all UNIX variants, SHLIB_PATH is preferred on HP, and LIB_PATH is preferred on AIX.
On UNIX platforms, the external name specification can contain a fully qualified name, in which case the LD_LIBRARY_PATH is not used. On the Windows platform, a fully qualified name cannot be used and the library search path is defined by the PATH environment variable.