[SDL] Dynamic loading on UNIX
Scott Stone
sstone at turbolinux.com
Mon Dec 14 16:02:05 PST 1998
On Mon, 14 Dec 1998, Sam Lantinga wrote:
> > Looks like SDL_Init looks for libSDLx11.so.0.9,
> > but it does not look into the directories that are in
> > my LD_LIBRARY_PATH.
>
> > Don't you think it should ?
>
> It should, and does on my system.
>
> > i.e., if I put libSDLx11.so.0.9 in /usr/local/lib and
> > set LD_LIBRARY_PATH to contain /usr/local/lib, I think
> > it should work.
>
> You might look in /etc/ld.so.conf to see if /usr/local/lib is there.
> SDL uses the dlopen API to dynamically load the library, and that
> should use the LD_LIBRARY_PATH... unless the binary is set-uid root,
> in which case it will only use the built-in and system library paths.
dlopen is cool... from the man page..:
If filename is not an
absolute path (i.e., it does not begin with a "/"), then
the file is searched for in the following locations:
A colon-separated list of directories in the user's
LD_LIBRARY path environment variable.
The list of libraries specified in
/etc/ld.so.cache.
/usr/lib, followed by /lib.
--------------------------------------------------
Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)
More information about the SDL
mailing list