필터 지우기
필터 지우기

How can I use codegeneration with MATLAB R2012b?

조회 수: 1 (최근 30일)
jaehyeon jeong
jaehyeon jeong 2013년 12월 24일
댓글: Walter Roberson 2013년 12월 27일
The MATLAB R2012b and the MATLAB Compiler Runtime v80 are installed on the my pc. I set up 'mex -setup' in the MATLAB.
  • [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012b\sys\lcc
  • [2] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files\Microsoft Visual Studio 10.0
  • [3] Microsoft Visual C++ 2008 SP1 in C:\Program Files\Microsoft Visual Studio 9.0
  • I chose compiler [3]. But The Building Model does not successfully complete.
  • ### Building test: .\test.bat
  • ...
  • lcc preprocessor fatal: Can't open input file -c
  • ...
  • gmake: * [test.obj] Error 1
  • ### Build procedure for model: 'test' aborted due to an error.

답변 (2개)

Walter Roberson
Walter Roberson 2013년 12월 24일
Odd; if you use
mex -setup
again, does it say that it is using lcc or VC2008 ?
Do you have the VC2008 compiler installed on your system?
You mention "MATLAB Compiler Runtime", but "codegeneration" is for MATLAB Coder, not "MATLAB Compiler". For MATLAB Compiler, use
mcc -setup
  댓글 수: 2
jaehyeon jeong
jaehyeon jeong 2013년 12월 27일
Thnaks for your answer.
I use
mcc -setup
, and the message is "Undefined function 'mcc' for input arguments of type 'char'.".
Walter Roberson
Walter Roberson 2013년 12월 27일
If mcc is not known, then you do not have MATLAB Compiler installed, or you do not have it licensed.
When you mention "building model", is that in Simulink ?

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


Ravi
Ravi 2013년 12월 27일
just mex -setup add any compiler u have or else add matlab compiler itself..
Then create a subsystem for the blocks which u want to have a code. Then Config. Parameters-> Real Time Workshop-> System Target File Select as ert.tlc.
Then Set-objectives to execution efficiency. Check Model->Clear all errors-> Then Generate code.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by