Simulink coder does not compile. Returns an error "Unable to locate specified compiler for xPC target"

조회 수: 2 (최근 30일)
Hello,
I have 64-bit windows 7 installation along with Visual Studio 2010 Prof. along with Windows 7 SDK v7.1 installed after the installation of Matlab 2012a. I tried to compile the example mex files in the extern directory of MATLAB. The yprime.c example compiled & built successfully.
I need to compile a Simulink model for execution on an x86 xPC target. I get the error as in the attached screenshot & the build log is attached. FYI the automated mex setup does not recognize the Visual Studio installation. I get the following error:
"Error using mex (line 206) Unable to complete successfully."
Could anyone please help resolve this?
Thanks,
Swaroop

답변 (1개)

Rajiv Ghosh-Roy
Rajiv Ghosh-Roy 2014년 1월 3일
You need to use the function xpcSetCC to set up your compiler. The fact that the mex setup does not detect your compiler is a clue, if xpcSetCC setup does not work, you can set it manually to the root directory of your compiler installation.
  댓글 수: 1
Swaroop
Swaroop 2014년 1월 5일
Hello Rajiv,
Thanks for your suggestion. I tried doing the same, but still I do not see any difference. I still get the same error.
If I generate the Code Generation report, I get the recurring error of
"The following block contains an S-Function that does not conform to Code Reuse restrictions. The S-Function block (a) should have a TLC implementation and (b) should set the option 'SS_OPTION_WORKS_WITH_CODE_REUSE' [the block name]"
How do I set this option in the block? The block is a Simulink inbuilt block for interfacing to a Quatech ESC-100 Serial card.
So, I guess it was not the compiler configuration issue after all. Sorry for getting misled by Matlab's error message.
Regards.

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

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by