When porting code built using another development system to UnixWare, if the code uses dlopen(3C) to open a dynamic shared library, you may get the following error on compilation:
dynamic linker: ./main: relocation error: symbol not found: symbol
The dynamic linker on UnixWare and dynamic linkers from some other versions of the UNIX system (notably Solaris) differ in the way in which global symbols are made available to shared objects.
The Solaris dynamic linker, for example, makes all global symbols defined in dynamically-linked executable programs available for export to shared objects.
The UnixWare dynamic linker exports only those symbols actually referenced by the shared objects you explicitly link to the executable, or any of their explicitly linked dependents. Therefore, if the executable uses dlopen on an object that expects to find some symbol in the executable, it may not have been exported. UnixWare uses this approach to reduce the size of executables built with shared libraries.
If you want more of the symbols defined in your executable to be exported, use the following cc(1) command line:
cc -Wl,-Bexport ...
See ld(1) for an explanation of the forms of the -Bexport option.