tlibrary1.pp 770 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. { %NORUN }
  2. { %SKIPTARGET=macos }
  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. const
  26. publicname='TestName';
  27. publicindex = 1234;
  28. procedure Test;export;
  29. begin
  30. writeln('Hoi');
  31. end;
  32. exports
  33. Test name publicname;
  34. {$ifdef supportidx}
  35. exports
  36. Test index publicindex;
  37. {$endif}
  38. begin
  39. end.
  40. {$else supported}
  41. begin
  42. Writeln('No library for that target');
  43. end.
  44. {$endif supported}