tlibrary2.pp 521 B

123456789101112131415161718192021222324252627282930313233
  1. { %NEEDLIBRARY }
  2. { Test program to test linking to fpc library }
  3. {$ifdef win32}
  4. {$define supported}
  5. {$endif win32}
  6. {$ifdef Unix}
  7. {$define supported}
  8. {$endif Unix}
  9. {$ifndef fpc}
  10. {$define supported}
  11. {$endif}
  12. {$ifdef supported}
  13. const
  14. {$ifdef win32}
  15. libname='tlibrary1.dll';
  16. {$else}
  17. libname='libtlibrary1.so';
  18. {$endif}
  19. procedure test;external libname name 'TestName';
  20. begin
  21. test;
  22. end.
  23. {$else not supported}
  24. begin
  25. Writeln('Dummy test because target does not support libraries');
  26. end.
  27. {$endif not supported}