필터 지우기
필터 지우기

Error using MATLAB "loadlibrary" function

조회 수: 39 (최근 30일)
Arun
Arun 2013년 7월 10일
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?

채택된 답변

Arun
Arun 2013년 7월 10일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by