Embedded MATLAB C-code generation error

조회 수: 1 (최근 30일)
Arza
Arza 2011년 2월 12일
Hello all,
I am doing embedded C-Code generation using Embedded Matlab coder. I tried the Simulink Real-Time Workshop demo:
Demos>Simulink > Real-Time Workshop > Application Samples > Embeddable C-Code Generation Using Embedded MATLAB Coder
However after running:
emlc -T rtw:exe -o rtwdemo_emlcsobel rtwdemo_emlcmain.m stdio.h
I got the error:
??? Build error: Build failed for project "main_rtw". See the target build log for further details.
Error in ==> main Line: 1 Column: 1
Compilation failed: Open error report.
The file main.c was generated. I am using Matlab R2008a and Visual C++ 2008 express edition. It should be mentioned that in order to configure Visual C++ 2008 express compiler with my 64 bit Matlab I used the following files:
http://www.mathworks.com/matlabcentral/fileexchange/22689
Regards,
Arza

답변 (2개)

Sebastian
Sebastian 2011년 2월 14일
Release 2009a is the first one that officially supports the Microsoft Visual C++ 2008 Express Edition on Windows 64bit for Embedded MATLAB: http://www.mathworks.com/support/compilers/release2009a/win64.html
So my recommendation would be use a newer MATLAB version so that the VC 2008 Express Edition is supported. In that case, please also have a look at note 6 on the page mentioned above.

Arza
Arza 2011년 2월 14일
Thanks Sebastian,
It should be mentioned that before configuring my Matlab using the files in following link:
http://www.mathworks.com/matlabcentral/fileexchange/22689
No installed compiler was located after running mex –setup.
However after doing what was mentioned in the readme file, the Visual C++ 2008 Express Edition was located successfully and mexopts.bat was updated.
Do you mean even if the Visual C++ 2008 Express is located by mex –setup, it does not work properly?
Thanks.
Arza
  댓글 수: 1
Sebastian
Sebastian 2011년 2월 15일
I don't know what exactly is done in the FileExchange solution that you mentioned. However, our developer have qualified and tested Embedded MATLAB only against the external C compiler listed on the page that I posted earlier. So if "mex -setup" did not show a compiler, then most likely because your compiler is not officially supported for that release of MATLAB.

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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by