Running generated C-code returns error "Could not open library: libmwhostlibaudio.dylib"
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jio Nocon
am 19 Jan. 2023
Kommentiert: Jio Nocon
am 24 Jan. 2023
Hello, I'm trying to run an executable I created from a Simulink model that processes real-time sound inputs. However, I get the error message
Could not open library: libmwhostlibaudio.dylibCould not open library: libmwhostlibaudio.dylib
When I directly look at the executable in XCode, libmwhostlibaudio.dylib appears when the code has to create an Audio Device Reader and Audio Device Writer (underlined emphasis my own):
/* Start for S-Function (saudioFromAudioDevice): '<Root>/Audio Device Reader' */
sErr = GetErrorBuffer
(&Simulink_model.AudioDeviceReader_AudioDeviceLib[0U]);
CreateHostLibrary("libmwhostlibaudio.dylib",
&Simulink_model.AudioDeviceReader_AudioDeviceLib[0U]);
...
/* Start for S-Function (saudioToAudioDevice): '<Root>/Audio Device Writer' */
sErr = GetErrorBuffer
(&Simulink_model.AudioDeviceWriter_AudioDeviceLib[0U]);
CreateHostLibrary("libmwhostlibaudio.dylib",
&Simulink_model.AudioDeviceWriter_AudioDeviceLib[0U]);
Within my machine, libmwhostlibaudio.dylib only appears within the C-code and not as its own file. Do I have to generate this file myself, or is the solution to this problem something else entirely?
0 Kommentare
Akzeptierte Antwort
jibrahim
am 20 Jan. 2023
Hi Jio,
The audio device blocks have a dependency on a dll that ships with MATLAB. If you want to execute your generated code, you will have to make sure that DLL is packaged correctly. You do not have to generate it yourself. Typically this is done using packngo. This link might be helpful to you:
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Code Generation and Deployment finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!