[lazarus] Building multiple projects

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Mar 26 05:26:21 EST 2003




On Wed, 26 Mar 2003, Tony Maro wrote:

> On that note, I've built several programs that made extensive usage of BPL 's but I have not built anything that used normal libraries. I've been thinking  about Using a library to handle the reports for CBT. Unfortunately I am not sure of how to write a library, and there is no wizard in Lazarus. I also am concerned with the fact that I don't want to install the library on the end-user's computer in the libs  directory, but leave it right with the executable. I've had problems figuring out the exe path before, especially when launched from a shortcut.

Paramstr(0) should return the correct binary executable.
You can check whether it is a symbolic link with stat() and S_ISLNK(),
and then follow the link with readlink(), this should produce the
correct binary name and hence directory.

Loading a library depends on whether it is statically (you must set
the LD_LIBRARY_PATH environment variable) or dynamically
(use dlopen() with complete path).

Michael.






More information about the Lazarus mailing list