tlibrary1.pp 692 B

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