tlibrary3.pp 794 B

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