tw6822b.pp 434 B

12345678910111213141516171819202122232425262728
  1. { %needlibrary }
  2. { %delfiles=tw6822a }
  3. program loader;
  4. {$mode objfpc}{$H+}
  5. uses
  6. popuperr,
  7. dynlibs;
  8. var
  9. h: TLibHandle;
  10. const
  11. {$ifdef unix}
  12. libname = './libtw6822a.'+SharedSuffix;
  13. {$else unix}
  14. libname = 'tw6822a.' + SharedSuffix;
  15. {$endif unix}
  16. begin
  17. writeln('hello from loader program');
  18. h:= loadlibrary(libname);
  19. if h = nilhandle then
  20. begin
  21. write('could not load library');
  22. exit;
  23. end;
  24. freelibrary(h);
  25. end.