http://forum.lazarus-ide.org/index.php?topic=21972.0

How to use shared library from application folder, in Linux?
September 08, 2013

How can I make an application to use libraries from the same folder where the executable is, in Linux? It works in Windows but not in Linux.

If I set environment variable "LD_LIBRARY_PATH=." it works. However, I have to do that from outside the application. Anyway to make it work from within the application?

Solution:

From project options: Compiler Options -> Compilation and Linking

Enable setting: "Pass options to linker with "-k", delimiter is space" with:
-R ./



