2014-06-09 3 views
0

R2011b에서 MATLAB Function 블록을 사용하려고합니다. 프로그램을 실행하려고하면 다음과 같은 오류가 발생합니다.Matlab 함수 블록 용 컴파일러 R2011b

Stateflow 및 MATLAB Function 블록에 필요한 C 컴파일러를 찾을 수 없습니다.

'mex -setup'을 사용하여 지원되는 C 컴파일러를 선택하십시오.

내가 선택하든 컴파일러
>> mex -setup 

Welcome 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/R2011b/win64.html 

Please choose your compiler for building MEX-files: 

Would you like mex to locate installed compilers [y]/n? n 

Select a compiler: 
[1] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker) 
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker) 
[3] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) 
[4] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker) 
[5] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker) 
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker) 
[7] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) 
[8] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) 
[9] Microsoft Software Development Kit (SDK) 7.1 
[10] Microsoft Visual C++ 2005 SP1 
[11] Microsoft Visual C++ 2008 SP1 
[12] Microsoft Visual C++ 2010 
[13] Microsoft Visual C++ 2010 Express 

[0] None 

Compiler: 1 

Warning: The default location for Intel C++ compiler is: 
     "C:\Program Files (x86)\Intel\ComposerXE-2011" 
     but either that directory does not exist or the configuration 
     is invalid. 

Use C:\Program Files (x86)\Intel\ComposerXE-2011 anyway [y]/n? y 

Please verify your choices: 

Compiler: Intel C++ 12.0 
Location: C:\Program Files (x86)\Intel\ComposerXE-2011 

Are these correct [y]/n? y 

Error: Microsoft Visual Studio 2008 SP1 Professional Edition was not found 
     by mex -setup. 
     The Microsoft Visual Studio 2008 SP1 Professional Edition linker is 
     required to build Intel C++ MEX-files. Please make sure that 
     Microsoft Visual Studio 2008 SP1 Professional Edition is installed 
     properly. 


Error using mex (line 206) 
Unable to complete successfully. 

, 내가 같은 오류가 발생합니다 :

내가 mex -setup 일을하려고, 나는 다음과 같은 출력을 얻을. 어떤 컴파일러를 선택해야합니까? 아니면 또 다른 문제가 있습니까?

+0

해야 할 일은 MEX **에 유효한 컴파일러 **를 배치시켜야한다는 것입니다. 아니오 (** n **)를 선택하면 Windows 용으로 알려진 모든 가능한 컴파일러가 나열됩니다. 예 (** y **)를 선택하고 실제로 ** 설치되어있는 컴파일러를 알려주십시오. – rayryeng

+0

says - 지원되는 SDK 또는 컴파일러가이 컴퓨터에서 발견되지 않았습니다. –

답변

1

귀하의 의견을 검토 한 결과 컴퓨터에 올바른 컴파일러가 설치되어 있는지 확인하려면 옵션을 선택해야합니다. 당신은 그것을 선택 했으므로 유효한 컴파일러를 찾을 수 없습니다. 따라서 컴퓨터에 컴파일러가 설치되어 있지 않습니다.

일반적으로 Windows에서 MEX 파일을 컴파일하려면이 작업을 수행 할 수 있도록 Microsoft Visual Studio 컴파일러가 필요합니다. 당신이 고등 교육 기관의 학생이라면

  1. , 마이크로 소프트 드림 스파크에가는 시도 : https://www.dreamspark.com/Product/Product.aspx?productid=72&cmpid=W_VS_DSV_DS_728x90_ENG이를 얻으려면, 당신에게 가능한 것이 무엇인지에 따라 당신을위한 네 가지 해결책이있다. 교육 기관은 Microsoft와 계약을 맺을 수 있으며 무료로 Microsoft Visual Studio를 다운로드 할 수 있습니다. MATLAB R2011 사용 방법을 보면서 Visual Studio 2010까지 지원됩니다. 따라서 을 버전으로 선택하십시오.
  2. (1)이 (가) 밖으로 나가지 않을 경우를 대비하여 Microsoft Visual Studio 90 일 시험판을 사용해 볼 수 있습니다. http://www.visualstudio.com/
  3. (1)을 (를) - (2)의 링크를 사용하십시오.
  4. Microsoft Visual Studio Express (이것은 무료입니다) - http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4을 사용하십시오. Visual C++ 2010 Express을 선택해야합니다. 기본적으로 Microsoft Visual Studio의 축소 버전입니다. 이 배포본에서 사용할 수있는 내용을 잘 모릅니다. 그러나 Microsoft Visual Studio 정식 버전에서 볼 수있는 대부분의 기능이 있습니다. 이것이 MATLAB R2011과 완벽하게 호환된다는 것을 알고 있습니다. 따라서 문제가 발생하지 않아야합니다. 내 의혹은 당신이 아마이 접근법을 사용할 것이고, 그것은 완전히 괜찮은 것이다. 당신 또한뿐만 아니라 윈도우 SDK를 다운로드해야합니다 http://www.microsoft.com/en-us/download/details.aspx?id=8279

행운을 빕니다!

+0

감사합니다. @rayryeng –

+0

@Aditi 안녕하십니까. MEX를 받고 실행하면 알려주세요. 주위에있을 때 여기에 의견을 남기십시오. – rayryeng

+0

그것은 나를 위해 작동합니다. –