I've tried to utilize someone's coding on matlab with mex file. but it doesnt work at all. how can i fix this problem?
First of all, i've tried to setup the compiler on matlab using "mex -setup" command.
and then finished the setup.
but if i run the code, error came up!
here is my command and error. it looks simple issue, but i dont have a time to figure out solution by myself ;(
>> mex -setupWelcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012a/win32.html Please choose your compiler for building MEX-files: Would you like mex to locate installed compilers [y]/n? ySelect a compiler: [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012a\sys\lcc [2] Microsoft Visual C++ 2005 SP1 in C:\Program Files\Microsoft Visual Studio 8 [0] None Compiler: 2Please verify your choices: Compiler: Microsoft Visual C++ 2005 SP1 Location: C:\Program Files\Microsoft Visual Studio 8 Are these correct [y]/n? y*************************************************************************** Warning: Support for Microsoft Visual C++ 2005 SP1 will be discontinued in a future release, at which time new versions will be supported. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/R2012a/win32.html *************************************************************************** Trying to update options file: C:\Users\ MichaelKim\AppData\Roaming\MathWorks\MATLAB\R2012a\mexopts.bat From template: C:\PROGRA~1\MATLAB\R2012a\bin\win32\mexopts\msvc80opts.bat Done . . . ************************************************************************** Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html Building with the -largeArrayDims option enables the new API. ************************************************************************** >> mex mhaLoad.cpp C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: 'mhaLoad.cpp' not found. *Error using mex (line 206)Unable to complete successfully.*
is there are simple way to solve?
I'm working on Win 7 32bit, matlab R2012a.
Thanks 🙂
Best Answer