0
votes

I am getting invalid mex file error while running some code in MATLAB (64-bit on Windows 7 64-bit).

After some googling, I learned that I need to download all dependency DLL files and put them with that MEX-file. So I did (used dependency walker to check for dependencies) but the issue remains. Dependency walker says different CPU types DLL files.

I can not find 64-bit version of some DLL files. What can I do to resolve the issue? Dependency walker's snapshot is here:

enter image description here

1
Short answer: you can't. 64-bit mex-files require the dependent dlls to be 64-bit as well. You can overcome this by wrapping the 32-bit dlls and using interprocess communication.Jørgen
Also make sure you're running the 64-bit version of dependency walker, otherwise it will be searching in the wrong places and incorrectly listing x86 dlls.Amro
Thank you both. @Amro I am using 64 bit dependency walker.Suleman

1 Answers

0
votes

@Jorgan dll wrapping is an option but a bit professional task as you would need to create .h file for the dll.
Fortunately I was getting the issue because the mex file was compiled under an earlier version of matlab the actual issue being compatibility. So I can run the code without dll files in matlab 2013a in which it was actually compiled.