tlibrary2.pp 535 B

12345678910111213141516171819202122232425262728293031323334
  1. { %OPT=-Fl. }
  2. { %NEEDLIBRARY }
  3. { Test program to test linking to fpc library }
  4. {$ifdef win32}
  5. {$define supported}
  6. {$endif win32}
  7. {$ifdef Unix}
  8. {$define supported}
  9. {$endif Unix}
  10. {$ifndef fpc}
  11. {$define supported}
  12. {$endif}
  13. {$ifdef supported}
  14. const
  15. {$ifdef win32}
  16. libname='tlibrary1.dll';
  17. {$else}
  18. libname='libtlibrary1.so';
  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}