mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 20:08:12 +02:00
23 lines
344 B
ObjectPascal
23 lines
344 B
ObjectPascal
{ %target=linux,android }
|
|
{ %skiptarget=$nosharedlib }
|
|
{ %needlibrary }
|
|
{ %delfiles=tlib2a }
|
|
|
|
uses dl;
|
|
|
|
var
|
|
hdl : Pointer;
|
|
|
|
begin
|
|
WriteLn('dlopen');
|
|
hdl := dlopen('./libtlib2a.so', RTLD_LAZY);
|
|
if hdl = nil then
|
|
WriteLn(dlerror())
|
|
else
|
|
begin
|
|
WriteLn('dlclose');
|
|
dlclose(hdl);
|
|
end;
|
|
WriteLn('exit');
|
|
end.
|