drywetmidi: DllNotFoundException on Apple Silicon chips
Hi! I’ve tried to get list of all MIDI devices on my MacBook m1 with .NET 6 but InputDevice.GetAll() throws
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'Melanchall_DryWetMidi_Native64' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMelanchall_DryWetMidi_Native64, 0x0001): tried: 'libMelanchall_DryWetMidi_Native64' (no such file), '/usr/local/lib/libMelanchall_DryWetMidi_Native64' (no such file), '/usr/lib/libMelanchall_DryWetMidi_Native64' (no such file), '/Users/dvorobey/RiderProjects/Piano/Piano/bin/Debug/net6.0/libMelanchall_DryWetMidi_Native64' (no such file) at Melanchall.DryWetMidi.Multimedia.CommonApi64.GetApiType() at Melanchall.DryWetMidi.Multimedia.CommonApi64.Api_GetApiType() at Melanchall.DryWetMidi.Multimedia.MidiDevicesSession.GetSessionHandle() at Melanchall.DryWetMidi.Multimedia.MidiDevice.EnsureSessionIsCreated() at Melanchall.DryWetMidi.Multimedia.InputDevice.GetAll() at InputDeviceExample.Program.Main(String[] args) in /Users/dvorobey/RiderProjects/Piano/Piano/Program.cs:line 11
Here is a code that I tried to launch
static void Main(string[] args) { var devices = InputDevice.GetAll(); }
What I doing wrong?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 43 (22 by maintainers)
Commits related to this issue
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
- Support Apple Silicon chips #204 — committed to melanchall/drywetmidi by melanchall 2 years ago
@melanchall the nativeless version of this project works on Android and iOS great 😉
I have a proper word for the results – AWESOME! Counts of passed tests are correct:
As for LoopbackDevice built by me, I built it using universal format, merging x86_64 and arm64 architectures. But maybe it works fine for dylibs, but need a bit different steps for apps. I’ve posted the question on Stack Overflow.
Absolutely agreed with you 😃
Well, I’ll build a prerelease NuGet package and let you know.
And many many many thank you, @ThaddeusChristopher. Support of Apple Silicon chips is a critical task in my opinion and I really don’t know how it could be solved without you.
Results:
There is a TestResults folder but its output for this run seems to be empty. I’ll take it that’s a good sign?
Glad it was an easy thing, ha. Looks like core tests run fine: