loadlibrary works on 32 bit but not 64 bit MATLAB

11 visualizaciones (últimos 30 días)
Emma
Emma el 3 de Abr. de 2017
Comentada: Walter Roberson el 6 de Abr. de 2017
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.

Respuestas (1)

Varun Gunda
Varun Gunda el 6 de Abr. de 2017
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.

Categorías

Más información sobre Introduction to Installation and Licensing 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