2
0

tlibrary1.pp 643 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. { %NORUN }
  2. { %SKIPTARGET=macos }
  3. { The .so of the library needs to be in the current dir when
  4. testing the loading at runtime }
  5. {$ifdef win32}
  6. {$define supported}
  7. {$define supportidx}
  8. {$endif win32}
  9. {$ifdef Unix}
  10. {$define supported}
  11. {$endif Unix}
  12. {$ifndef fpc}
  13. {$define supported}
  14. {$endif}
  15. {$ifdef supported}
  16. library bug;
  17. const
  18. publicname='TestName';
  19. publicindex = 1234;
  20. procedure Test;export;
  21. begin
  22. writeln('Hoi');
  23. end;
  24. exports
  25. Test name publicname;
  26. {$ifdef supportidx}
  27. exports
  28. Test index publicindex;
  29. {$endif}
  30. begin
  31. end.
  32. {$else supported}
  33. begin
  34. Writeln('No library for that target');
  35. end.
  36. {$endif supported}