[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implicit linking of local .so



"J. Perkins" wrote:

> >> > #! /bin/sh
> >> >
> >> > # add directory to library search path
> >> > if [ -z "$LD_LIBRARY_PATH" ] ; then
> >> >     LD_LIBRARY_PATH="/directory/where/lib/is/"
> >> > else
> >> >     LD_LIBRARY_PATH="/directory/where/lib/is/:${LD_LIBRARY_PATH}"
> >> > fi
> >> >
> >> > # this should be unnecessary, don't have time to read the man-page
> >> > export LD_LIBRARY_PATH
> 
> Ick. Well, it does solve the problem I guess. I was hoping for something
> a little more transparent.

If you go the script way (which can be okay, for example, call you game
"something.bin" and make the script "something"), make sure to "exec"
the game.

You might want to try out the -rpath options to the linker.

Also, you might do like we do, which is dynamically link the game when
developing, then statically linking the release binary.

-- 
Pierre Phaneuf
http://ludusdesign.com/