www.delorie.com/gnu/docs/octave/kpathsea_45.html   search  
Buy GNU books!

Kpathsea: A library for path searching

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] dlopen

(This section adapted from the file `dlsym.c' in the X distribution.)

The Xlib library uses the standard C function wcstombs. Under SunOS 4.1, wcstombs uses the `dlsym' interface defined in `libdl.so'. Unfortunately, the SunOS 4.1 distribution does not include a static `libdl.a' library.

As a result, if you try to link an X program statically under SunOS, you may get undefined references to dlopen, dlsym, and dlclose. One workaround is to include these definitions when you link:

void *dlopen() { return 0; }
void *dlsym()  { return 0; }
int dlclose()  { return -1; }

These are contained in the `dlsym.c' file in the MIT X distribution.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003