[lazarus] Building multiple projects

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Mar 26 06:43:09 EST 2003

On Wed, 26 Mar 2003 11:57:06 +0100 (W. Europe Standard Time)
Michael Van Canneyt <michael.vancanneyt at wisa.be> wrote:

> 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.

You also need to search with the PATH environment variable.
The IDE has a function for all this. I think, it is useful for other
programs as well, so I moved it to filectrl.pp. Search for function


> 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.
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

More information about the Lazarus mailing list