フィルターのクリア

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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by