Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-04

Testing shared libraries compiled with FPC/Lazarus under Linux

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

patspiper

Is it possible to test a shared library compiled with Lazarus/FPC under Linux without copying that library to /usr/lib or fiddling with the OS configuration to locate them?

Under Windows, it is enough to have the testing executable (host application) in the same folder as the shared library. Is something of the kind possible in Linux?

Stephano

Reply by email

Tomas Hajny
to patspiper
patspiper wrote 7 lines
Is it possible to test a shared library compiled with Lazarus/FPC under Linux without copying that library to /usr/lib or fiddling with the OS configuration to locate them? Under Windows, it is enough to have the testing executable (host application) in the same folder as the shared library. Is something of the kind possible in Linux?

I believe that LD_LIBRARY_PATH environment variable should do that under Un*x platforms in general (i.e. including Linux).

Tomas

Reply by email

patspiper
to Tomas Hajny
Tomas Hajny wrote 11 lines
On 9 Apr 12, at 0:42, patspiper wrote: > Is it possible to test a shared library compiled with Lazarus/FPC under > Linux without copying that library to /usr/lib or fiddling with the OS > configuration to locate them? > > Under Windows, it is enough to have the testing executable (host > application) in the same folder as the shared library. Is something of > the kind possible in Linux? I believe that LD_LIBRARY_PATH environment variable should do that under Un*x platforms in general (i.e. including Linux).

Thanks!!

I will add that environment variable overrides can be entered in 'Run Parameters' in Lazarus.

Stephano

Reply by email

Alan Krause
to Tomas Hajny: I believe that LD_LIBRARY_PATH environment variable should do that under Un*x platforms…

Indeed. You can put the following in your .bashrc file:

export LD_LIBRARY_PAH=.

Alan

Tomas Hajny wrote 14 lines
On 9 Apr 12, at 0:42, patspiper wrote: > Is it possible to test a shared library compiled with Lazarus/FPC under > Linux without copying that library to /usr/lib or fiddling with the OS > configuration to locate them? > > Under Windows, it is enough to have the testing executable (host > application) in the same folder as the shared library. Is something of > the kind possible in Linux? I believe that LD_LIBRARY_PATH environment variable should do that under Un*x platforms in general (i.e. including Linux). Tomas

Reply by email