S function Impossible to Load library
Mostra commenti meno recenti
Hi All,
i have this problem when i tried to run a simulation with simulink,
Error reported by S-function 'mp_read_fields' in 'matlab_dll_read/Fields Reader/Read Fields': Impossible to load library
Is there any clue to what could possible causing this error?
Thank you
Risposte (2)
Kaustubha Govind
il 14 Ago 2012
Modificato: Kaustubha Govind
il 14 Ago 2012
What do you get when you run these commands at your MATLAB prompt:
>> which mp_read_fields
Do you have access to the source code for this file? The error "Impossible to load library" doesn't seem like a standard error that Simulink or the OS would throw. My guess is that the file 'mp_read_fields' itself is reporting this error. Perhaps there some DLL dependencies that it cannot find on your machine?
Have you been able to get this S-function to work on any other machine?
3 Commenti
K E
il 14 Ago 2012
I also suspect this is not a standard Simulink error: I did a web search for the error text you provided and Simulink, and came up with nothing.
asadilan
il 14 Ago 2012
Kaustubha Govind
il 15 Ago 2012
That kind of error typically implies missing module dependencies. Perhaps you should try profiling your DLL with Dependency Walker to see if it can't find certain DLLs. Also, is the DLL for the same platform (32-bit vs. 64-bit) as the S-function DLL? You can figure this out using DUMPBIN.
Image Analyst
il 13 Ago 2012
0 voti
You probably didn't pass in the full path (folder + base filename) of the DLL or the filename was somehow otherwise not correct. You should always use exist(fullFileName, 'file') before calling LoadLibrary() to make sure the file exists, and alert the user if the file can't be found. For example, is 'matlab_dll_read/Fields Reader/Read Fields' the file name? Shouldn't it have a .DLL extension and a drive letter?
4 Commenti
asadilan
il 13 Ago 2012
Walter Roberson
il 13 Ago 2012
'matlab_dll_read/Fields Reader/Read Fields' looks to me as if it is a Simulink block name.
It would be useful to know which library could not be loaded, and whether the attempt is being made in user code or in Simulink code that is expected to be transparent to the user.
Image Analyst
il 13 Ago 2012
If Walter is right, I can't help you since I just use the LoadLibrary() function in regular MATLAB and I don't have Simulink. But tell him what library you were trying to load.
asadilan
il 14 Ago 2012
Categorie
Scopri di più su Simulink Environment Customization in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!