woodemi / libusb.dart

Dart wrapper via dart:ffi for https://github.com/libusb/libusb
BSD 3-Clause "New" or "Revised" License
40 stars 23 forks source link

Examples fail to run #28

Open jonahgeorge opened 1 year ago

jonahgeorge commented 1 year ago

Very excited to have found this library, unfortunately when I try to run the examples I receive the following FFI errors:

$ dart --version
Dart SDK version: 2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "macos_arm64
$ dart run example/main.dart
lib/src/libusb.ffigen.dart:112:15: Error: Type 'pkg_ffi.Char' not found.
  ffi.Pointer<pkg_ffi.Char> libusb_error_name(
              ^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:127:17: Error: Type 'pkg_ffi.Char' not found.
    ffi.Pointer<pkg_ffi.Char> locale,
                ^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:140:15: Error: Type 'pkg_ffi.Char' not found.
  ffi.Pointer<pkg_ffi.Char> libusb_strerror(
              ^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:221:17: Error: Type 'pkg_ffi.Int' not found.
    ffi.Pointer<pkg_ffi.Int> config,
                ^^^^^^^^^^^
lib/src/libusb.ffigen.dart:901:17: Error: Type 'pkg_ffi.UnsignedChar' not found.
    ffi.Pointer<pkg_ffi.UnsignedChar> endpoints,
                ^^^^^^^^^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:925:17: Error: Type 'pkg_ffi.UnsignedChar' not found.
    ffi.Pointer<pkg_ffi.UnsignedChar> endpoints,
                ^^^^^^^^^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:945:15: Error: Type 'pkg_ffi.UnsignedChar' not found.
  ffi.Pointer<pkg_ffi.UnsignedChar> libusb_dev_mem_alloc(
              ^^^^^^^^^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:966:17: Error: Type 'pkg_ffi.UnsignedChar' not found.
    ffi.Pointer<pkg_ffi.UnsignedChar> buffer,
                ^^^^^^^^^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:1152:17: Error: Type 'pkg_ffi.UnsignedChar' not found.
    ffi.Pointer<pkg_ffi.UnsignedChar> data,
                ^^^^^^^^^^^^^^^^^^^^
lib/src/libusb.ffigen.dart:1186:17: Error: Type 'pkg_ffi.UnsignedChar' not found.
    ffi.Pointer<pkg_ffi.UnsignedChar> data,