mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 07:03:21 +02:00
35 lines
535 B
ObjectPascal
35 lines
535 B
ObjectPascal
{ %OPT=-Fl. }
|
|
{ %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}
|
|
|
|
const
|
|
{$ifdef win32}
|
|
libname='tlibrary1.dll';
|
|
{$else}
|
|
libname='libtlibrary1.so';
|
|
{$endif}
|
|
|
|
procedure test;external libname name 'TestName';
|
|
|
|
begin
|
|
test;
|
|
end.
|
|
{$else not supported}
|
|
begin
|
|
Writeln('Dummy test because target does not support libraries');
|
|
end.
|
|
{$endif not supported}
|