I tried to make an import for libusb-1.0.22.7z from
https://libusb.info/ . I used lazarus to generate and compile the console app, but I verified, you can compile it from the command line, you'll just have to change the path to you freepascal installation. I converted the libusb.h to libusb.pas with h2pas from the
lazarus plugin H2Paswizard (
https://wiki.freepascal.org/H2Paswizard ). You'll find the project for H2Paswizard at https://github.com/jsuzineau/pascal_o_r_mapping/tree/TjsDataContexte/tools/lsusb/include/libusb-1.0/project1.h2p It's a very quick an dirty conversion. In h2paswizard I added a rename from LIBUSB_CALL to WINAPI. I got some problems with var parameters in
functions for example I needed to change I think this can be fixed by tuning some details of the import.
|
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal