Using MEX files on Win 64

3 views (last 30 days)
matlab user guy
matlab user guy on 17 Jul 2012
I downloaded some pre-compiled open source code that includes MEX files. When I try to run the code, it says "undefined function ... of type 'double' for one of the MEX files
I am using Windows 64-bit. What else needs to be done to get your system to be able to recognize these files properly? I know MEX is installed, as help mex returns the help documentation. Also I am using MATLAB 2012.
Thanks a lot.
[Merged information from duplicate question]
I downloaded some pre-compiled open source code that includes MEX files. When I try to run the code, it says "undefined function ... of type 'double' for one of the MEX files. They are of type mexa64. When I go through trying to recompile it doesn't seem to work due to various errors. Is there any way to configure my system to get these files to work properly?
I am using Windows 64-bit. What else needs to be done to get your system to be able to recognize these files properly?
Thanks a lot.

Answers (2)

Walter Roberson
Walter Roberson on 17 Jul 2012
mex -setup
and then re-compile the code. See http://www.mathworks.com/support/compilers/R2012a/win64.html for a list of compilers. Note that you will need SDK 7.1 as well as the compiler itself.
Make sure the .mexw64 files that result are in your MATLAB path.
If what you received has .dll or .mexw32 files instead of .mexw64 files, then you will definitely need to recompile.

Walter Roberson
Walter Roberson on 17 Jul 2012
Instead of opening duplicate questions, describe the errors you get when compiling (and indicate which compiler you are using.) Did you download the SDK ?

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!