[omniORB] SSL & static linking

Duncan Grisby duncan@grisby.org
Wed Sep 4 18:43:01 2002


On Wednesday 4 September, Slava Garelin wrote:

> If I try link SSL example statically, then I have 

The SSL library relies on some static constructors. On most platforms,
the static linker notices that the library is not used, so it misses
it out entirely, meaning the constructors are never run. The
work-around for this is to force the use of a symbol from the library
by the application. You do this by putting

  #include <omniORB4/optionalFeatures.h>

in one of the application's source files. By default, the
optionalFeatures header forces linking with both the SSL transport (if
it exists) and the codeset library. To turn off linking with the
codeset library, #define OMNI_CODESETS to be 0 before the #include.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --