danrubel / rpi_gpio.dart

Dart library for accessing the Raspberry Pi GPIO pins
Other
47 stars 5 forks source link

Error running the example app #23

Closed olidevelop closed 1 year ago

olidevelop commented 2 years ago

-

olidevelop commented 2 years ago

Hi Dan, I managed to install latest version of dart on RPi 4 in the meantime. Following your instructions I now get an error (fails to build) when running your example app:

../.pub-cache/hosted/pub.dartlang.org/rpi_gpio-0.7.2/lib/src/rpi_gpio_isolate.dart:6:1: Error: Dart native extensions are no longer supported.
Migrate to using FFI instead (https://dart.dev/guides/libraries/c-interop)
import 'dart-ext:rpi_gpio_ext';
^

Thank you for your help! Oliver

danrubel commented 2 years ago

Looks like I need to migrate my code to use FFI rather than the older native extension API.

Until I can get to this rewritten, you can download and run with Dart SDK 2.12.4 from https://dart.dev/get-dart/archive ... that's what I currently use on the Raspberry Pi as I have not had a chance to update yet.

danrubel commented 1 year ago

This package has been updated to use dart:ffi and now runs on Dart SDK 2.18