Lazarus

Programming => Packages and Libraries => Topic started by: notebook on August 03, 2011, 07:59:21 am

Title: External dll/so
Post by: notebook on August 03, 2011, 07:59:21 am
How I can add dll/so to  main project as reference?

in visual studio you cad add dll as reference, Can I do this in lazarus?

How I can load dll/so dynamically in main project?



Title: Re: External dll/so
Post by: jixian.yang on August 03, 2011, 10:57:09 am
In Lazarus, we can put {$MODE DELPHI} in the unit which calls the dlls, then it is the same way as in Delphi.

The demo projects for Delphi is quite easy to Google.

Title: Re: External dll/so
Post by: felipemdc on August 03, 2011, 11:09:50 am
In Lazarus you don't need to add a reference to the library in the project itself, you simply add code which binds to the library.

Here is documentation about how to dynamically load a dynamic library:

http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries#Loadlibrary_-_loading_a_dynamic_library

And about how to statically load a dynamic library:

http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries#External_-_statically_loading_a_dynamic_library
Title: Re: External dll/so
Post by: jixian.yang on August 03, 2011, 11:30:24 am
Thanks.
TinyPortal © 2005-2018