How to get compiler for mex in matlab?

6 views (last 30 days)
tedy
tedy on 11 Apr 2013
Hello,
i try to get my compiler with execute mex -setup, but it results
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in D:\PROGRA~2\MATLAB~2\sys\lcc
[0] None
Compiler: 1
Please verify your choices:
Compiler: Lcc-win32 C 2.4.1
Location: D:\PROGRA~2\MATLAB~2\sys\lcc
Are these correct [y]/n? y
Trying to update options file: C:\Documents and Settings\user\Application Data\MathWorks\MATLAB\R2011a\mexopts.bat
From template: D:\PROGRA~2\MATLAB~2\bin\win32\mexopts\lccopts.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/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
i'm running in windows xp 32 bit and R2011a. What should i do? i also try to open the link in 'warning' but documentation file not found. Please help me. Thanks in advance

Answers (2)

Jan
Jan on 11 Apr 2013
Edited: Jan on 11 Apr 2013
You get an error, when you try to compile svm.cpp, because this is a C++ file, while the LCC compiler is a C-Compiler.
To compile C++ files, a C++ compiler is required. See http://www.mathworks.com/support/compilers/R2011a/win32.html for a list of supported compilers. I can recommend the Microsoft Visual C++ 2010 Express compiler. For the 2011b/64 bit and 2009a/32 versions I could compile succesfully after installing the SDKs only, but I did not test this for 2011a/32.

Walter Roberson
Walter Roberson on 11 Apr 2013
You do not need to do anything more. The warning is a reminder that some old routines will soon not be supported; it is something you do not need to be concerned with unless you plan to compile old routines.
  2 Comments
tedy
tedy on 11 Apr 2013
So, if everything is ok, why i get an error when i try to execute make.m in libsvm? D:\PROGRA~2\MATLAB~2\BIN\MEX.PL: Error: Compile of '..\svm.cpp' failed.
Kaustubha Govind
Kaustubha Govind on 11 Apr 2013
tedy: Perhaps you have syntax errors in your MEX-file? It will help if you post the full error (you may want to compile with the mex -v option for verbose mode).

Sign in to comment.

Categories

Find more on Troubleshooting in MATLAB Compiler SDK 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!