Date: Jul 7, 2013 9:17 PM
Author: Om
Subject: Matlab Real Time Workshop Embedded Coder error

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.

I am using 32-bit Matlab R2008a on a Mac.


I tried running the same demo on a windows machine (64 bit R2010a) - I got a different error (do not have the error message) - it was something along the lines 'Could not locate MEX compiler options file mexopts.bat'.
When I run mex -setup, it shows 0 compilers when I try to automatically locate a compiler. I have Visual Studio 2010 Express installed on this computer. I am currently downloading Visual Studio 2008 Express, because it looks like R2010a Simulink does not support 2010 Express (

Any help getting either of these issues sorted out would be appreciated.