Lazarus
Programming => Packages and Libraries => Topic started 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?
-
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.
-
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
-
Thanks.