loadlibrary works on 32 bit but not 64 bit MATLAB
9 次查看(过去 30 天)
显示 更早的评论
I am trying to load a set of dlls from National Instruments in MATLAB so that I can interface with the National Instruments DAQ card through MATLAB. This has worked in the past using 32 bit MATLAB (on a 64 bit machine) however it is not working on 64 bit MATLAB. How can I fix this?
I am running the following command: funclist = loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni');
and get the following error:
"Error using loadlibrary There was an error loading the library "C:\Users\ecating\Documents\MATLAB\Version_1\V1_scripts_DoNotDelete\NI_DAQ_scriptsAndInfo\nicaiu.dll" C:\Users\ecating\Documents\MATLAB\Version_1\V1_scripts_DoNotDelete\NI_DAQ_scriptsAndInfo\nicaiu.dll is not a valid Win32 application.
Error in c_PCIE6321 (line 55) funclist = loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni');
Caused by: Error using loaddefinedlibrary C:\Users\ecating\Documents\MATLAB\Version_1\V1_scripts_DoNotDelete\NI_DAQ_scriptsAndInfo\nicaiu.dll is not a valid Win32 application."
I am running MATLAB 2016b (version 9.1) on Windows 10.
0 个评论
回答(1 个)
Varun Gunda
2017-4-6
The "is not a valid Win32 application" error usually means that you are attempting to load a 32-bit DLL using 64-bit MATLAB. Check if there are 64-bit versions of the NI DLLs available and download them. Or You can try installing 32-bit MATLAB on your 64-bit machine and use them as you were doing previously.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!