|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Studio 12.3: C++ User's Guide Oracle Solaris Studio 12.3 Information Library|
If you want to use dlopen() to open a C++ shared library from a C program, make sure that the shared library has a dependency on the appropriate C++ runtime (libCrun.so.1 for -compat=5).
To do this, add -lCrun for -compat=5 to the command line when building the shared library. For example:
example% CC -G -compat=5... -lCrun
If the shared library uses exceptions and does not have a dependency on the C++ runtime library, your C program might behave erratically.