Using MEX files on Win 64

3 次查看(过去 30 天)
matlab user guy
matlab user guy 2012-7-17
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.

回答(2 个)

Walter Roberson
Walter Roberson 2012-7-17
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 2012-7-17
Instead of opening duplicate questions, describe the errors you get when compiling (and indicate which compiler you are using.) Did you download the SDK ?

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by