* test runtime loading of library

This commit is contained in:
peter 2002-12-15 13:29:12 +00:00
parent a2a1a36e83
commit 9875ffa598
2 changed files with 30 additions and 0 deletions

View File

@ -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
View 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}