Borrar filtros
Borrar filtros

Error using MATLAB "loadlibrary" function

39 visualizaciones (últimos 30 días)
Arun
Arun el 10 de Jul. de 2013
I am trying to load the NI DAQmx library "nicaiu.dll" and the associated header "nidaqmx.h" in MATLAB as given below:-
loadlibrary('nicaiu.dll','nidaqmx.h','alias','ni');
Please note that nicaiu.dll is 32-bit and along with nidaqmx.h reside in the current MATLAB(again 32-bit) folder. I am getting the following error:-
Warning: Warnings messages were produced while parsing. Check the functions you intend to use for correctness. Warning text can be
viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary at 344
Error using loadlibrary (line 419)
There was an error loading the library "C:\Documents and Settings\rendtest\My Documents\MATLAB\nicaiu.dll"
A dynamic link library (DLL) initialization routine failed.
Caused by:
Error using loaddefinedlibrary
A dynamic link library (DLL) initialization routine failed.
What am I doing wrong?

Respuesta aceptada

Arun
Arun el 10 de Jul. de 2013
After some research about dependencies of nicaiu.dll, I discovered that all the dependencies of the dll file must be solved for it to be loaded correctly. So, I had to point this to its original location (C:\Windows\System32) to solve this problem! So my loadlibrary call would look like:-
loadlibrary('C:\windows\system32\nicaiu.dll','nidaqmx.h','alias','ni');
With the above, my problem is resolved. Alternatively, there must be some way of adding the above path to the loadlibrary's location-to-look-for-libraries. For now, I shall close this question.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by