Forum > Packages and Libraries
External dll/so
(1/1)
notebook:
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?
jixian.yang:
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.
felipemdc:
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
jixian.yang:
Thanks.
Navigation
[0] Message Index