필터 지우기
필터 지우기

How to get compiler for mex in matlab?

조회 수: 9 (최근 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에서 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