How to get compiler for mex in matlab?

5 次查看(过去 30 天)
tedy
tedy 2013-4-11
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

回答(2 个)

Jan
Jan 2013-4-11
编辑:Jan 2013-4-11
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 2013-4-11
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 个评论
tedy
tedy 2013-4-11
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 2013-4-11
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).

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in MATLAB Compiler SDK 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by