필터 지우기
필터 지우기

Can not find the compiler when using simulink

조회 수: 8 (최근 30일)
hong feng
hong feng 2012년 12월 28일
Hi, I am using matlab2012b. I want to take the simulink xPC Target demo"xpccanpci" for a test, but when I build the model, the simulink will report an error as "An installed compiler was not detected. Certain simulation modes, as well as host-based coder builds require that a compiler be installed." but I think I have installed the compiler, when I type in the "mex -setup" in the command window for matlab, it will give a choice for compiler, and my installed compiler can be listed as: Select a compiler: [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012b\sys\lcc [2] Microsoft Visual C++ 2010 in C:\Program Files\Microsoft Visual Studio 10.0 [3] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
[0] None
and I also restarted my matlab after choosing a compiler. I have tried the three compilers, but no use.
May I get some help about this problem? Thank you.

채택된 답변

hong feng
hong feng 2012년 12월 28일
I am so sorry for my stupid question, i just thouhgt that xpc use the same compiler as mex-setup. but xpc need another compiler setting using command"xpcsetCC'setup'", wishing useful for other new users on 2012b
  댓글 수: 2
Gijs van Oort
Gijs van Oort 2013년 3월 1일
Thank you so much for sharing your own answer!
It took me two complete days of in/un/rein-stalling tens of different versions of DotNet, SDK and Visual Studio in even more different orders before stumbling upon this thread, and with one simple command in Matlab everything has been fixed.
Mathworks, please include a line in http://www.mathworks.nl/support/compilers/R2012b/win64.html saying that using mex -setup is NOT enough; that would have saved me (and I guess many others) hours of work!
Chethan Pandarinath
Chethan Pandarinath 2013년 8월 10일
Also wanted to say thank you for sharing this answer, I was stuck on this "stupid question" for quite a while.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by