tlibrary1.pp 731 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. const
  23. publicname='TestName';
  24. publicindex = 1234;
  25. procedure Test;export;
  26. begin
  27. // writeln('Hoi');
  28. end;
  29. exports
  30. Test name publicname;
  31. {$ifdef supportidx}
  32. exports
  33. Test index publicindex;
  34. {$endif}
  35. begin
  36. end.
  37. {$else supported}
  38. begin
  39. Writeln('No library for that target');
  40. end.
  41. {$endif supported}