How to select compiler if not available on the list provided by mex -setup ??
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
Hi, i have just downloaded the matlab toolbox:
The mex function is asking me for a compiler. Microsoft Visual C++ express 2010 is already installed. I have followed the instructions of the Mex-setup function which is unable to locate this compiler. How can i compile the few .cpp file i need? Or how can find my compiler? Thanks
채택된 답변
Walter Roberson
2011년 6월 21일
Is your system 32 bit Windows or 64 bit?
댓글 수: 11
See http://www.mathworks.com/support/compilers/R2011a/win64.html
See also, http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L
Thank you!
I am trying it out.
Sorry but i have been through all the steps indicated and I still end up with an error when compiling. All files are in the same folder. Here is the command i put in Matlab:
mex BuildGLTree3DFEX.cpp
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: 'BuildGLTree3DFEX.cpp' not found.
??? Error using ==> mex at 222 Unable to complete successfully.
To cross-check: the URL you posted first was for a single .m file only. Did you download and unzip the entire archive? In MATLAB, what do you see if you ask
ls BuildGLTree3DFEX.cpp
and
ls B*.*
>> ls BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp not found.
>> ls b**
boot.ini
Well, i don't understand something. do the .cpp files need to be in the bin folder of Matlab?, i have also tried to extract them somewhere else, and i have:
ls BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp
>> mex BuildGLTree3DFEX.cpp
BuildGLTree3DFEX.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(576) : error C2371: 'char16_t' : redefinition; different basic types
c:\program files\matlab\r2010a\extern\include\matrix.h(330) : see declaration of 'char16_t'
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(119) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(120) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(121) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(141) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(142) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(143) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(235) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(255) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
f:\phd\research\snownet data\glenncreek\scan shift\GLTree3DFEX.cpp(276) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
BuildGLTree3DFEX.cpp(29) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
BuildGLTree3DFEX.cpp(35) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of 'BuildGLTree3DFEX.cpp' failed.
??? Error using ==> mex at 222
Unable to complete successfully.
Looks a little bit better...
The files do not need to be in the bin folder (and being there is a bad idea), but you _do_ have to be cd()'d to the directory they are in.
For the other matter, see the solutions here:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/281754
And yes, i have unzip the entire archive.
Sorry, but i am not very familiar yet with programming out of Matlab. So there are few explanation on the page you just gave, but very unclear to me.
Neither in the file yvals.h nor matrix.h there is a command line
namespace mat
If i follow instruction given by Fifo, the line number he gave seems irrelevant to me for the file matrix.h. Which solution should i follow?
I would suggest doing it the way Venn suggests. Go in to yvals.h and find the line that has
#include <matrix.h>
and change it to
namespace mat {
#include <matrix.h>
}
yvals.h does not have such line. I have posted a question for Venn, hopefully he will answer me.
Thanks a lot!
추가 답변 (1개)
Simon
2011년 6월 21일
it is a Windows 64bit with Matlab 2010a installed.
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
