mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-15 22:50:40 +01:00
* test runtime loading of library
This commit is contained in:
parent
a2a1a36e83
commit
9875ffa598
@ -1,5 +1,9 @@
|
||||
{ %OPT=-FE. }
|
||||
{ %NORUN }
|
||||
|
||||
{ The .so of the library needs to be in the current dir when
|
||||
testing the loading at runtime }
|
||||
|
||||
{$ifdef win32}
|
||||
{$define supported}
|
||||
{$define supportidx}
|
||||
@ -7,6 +11,9 @@
|
||||
{$ifdef Unix}
|
||||
{$define supported}
|
||||
{$endif Unix}
|
||||
{$ifndef fpc}
|
||||
{$define supported}
|
||||
{$endif}
|
||||
|
||||
{$ifdef supported}
|
||||
|
||||
@ -19,6 +26,7 @@ const
|
||||
procedure Test;export;
|
||||
|
||||
begin
|
||||
writeln('Hoi');
|
||||
end;
|
||||
|
||||
exports
|
||||
|
||||
22
tests/test/tlibrary2.pp
Normal file
22
tests/test/tlibrary2.pp
Normal file
@ -0,0 +1,22 @@
|
||||
{ %NEEDLIBRARY }
|
||||
|
||||
{ Test program to test linking to fpc library }
|
||||
|
||||
{$ifdef win32}
|
||||
{$define supported}
|
||||
{$endif win32}
|
||||
{$ifdef Unix}
|
||||
{$define supported}
|
||||
{$endif Unix}
|
||||
{$ifndef fpc}
|
||||
{$define supported}
|
||||
{$endif}
|
||||
|
||||
{$ifdef supported}
|
||||
|
||||
procedure test;external 'libtlibrary.so' name 'TestName';
|
||||
|
||||
begin
|
||||
test;
|
||||
end.
|
||||
{$endif supported}
|
||||
Loading…
Reference in New Issue
Block a user