tlibrary3.pp 746 B

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