[fpc-pascal] [Linux] Accessing Shared Libraries in *Current* Binary Directory
tom_at_work at gmx.at
Wed Aug 20 18:04:25 CEST 2008
Am 20.08.2008 um 15:37 schrieb T. Guilleminot:
> For portability reason I would need to keep my shared libraries in the
> same directory as the binary which need to call them.
> As per http://courses.cs.vt.edu/~cs3304/FreePascal/doc/prog/
> node13.html :
> "This program can be compiled without any additional command-
> switches, and
> should run just like that, provided the library is placed where the
> can find it.
> For example, on LINUX, this is /usr/lib or any directory listed in the
> /etc/ld.so.conf file. On WINDOWS, this can be the program
> directory, the
> WINDOWS system
> directory, or any directoy mentioned in the PATH".
> So I would basically need the behaviour of Windows on Linux. Of
> course I
> would avoid to have to update ld.so.conf file.
> Is there any solution ?
You may try passing special linker options to the GNU ld linker like
described in http://www.eyrie.org/~eagle/notes/rpath.html .
E.g. something like -k"-R ." maybe helps, did never t.
More information about the fpc-pascal