Calling 64 bit third party dll from mex doesn't work for one function
Show older comments
Hi all,
I wrote a mex function to wrap a third party library that is provided as a dll with an "import library" .lib file provided. Everything works great for 32bit Matlab. I am now trying the 64 bit dll with 64 bit Matlab and almost everything seems to work except for a call to read data. I have simplified the program significantly and it seems as if the problem somehow stems from running the code in Matlab. Compiling essentially the same code as an executable in Visual Studio without the mex libraries works.
I'm using MATLAB Version: 8.1.0.604 (R2013a) although I think I've had this problem with 2014a as well. I'm using Visual Studio 2012 to compile the mex code.
This third party library is very Windows heavy. I'm wondering if there is some sort of conflict between libraries with Matlab and this dll. Is that possible?
The data reading in the third party library uses some sort of decompression algorithm and I notice (using Dependency Walker) that libmx.dll references zlib1.dll which is x86, not x64. Is there something going on there ...?
General thoughts as to how to procede?
Thanks, Jim
Accepted Answer
More Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!