tlibrary2.pp 538 B

12345678910111213141516171819202122232425262728293031323334
  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='tlibrary1';
  18. {$linklib tlibrary1}
  19. {$endif}
  20. procedure test;external libname name 'TestName';
  21. begin
  22. test;
  23. end.
  24. {$else not supported}
  25. begin
  26. Writeln('Dummy test because target does not support libraries');
  27. end.
  28. {$endif not supported}