Build error using emlmex

This is the first time I try to convert a .m file into an executable c file. My platform is linux (ubuntu) and I am using the function emlmex.
First I start with ">>mex - setup" and I have chosen the following compiler:
/home/user/mlab/bin/gccopts.sh : Template Options file for building gcc MEX-files
Next I defined a simple function:
function r = emcrand() %#eml
% The directive %#eml declares the function
% to be Embedded MATLAB compliant
r = rand();
finally, I perform ">>emlmex emcrand" and I get the following:
??? Build error: Compilation returned error status code 2. See the target build log for further details.
Error in ==> emcrand Line: 1 Column: 1
C-MEX generation failed: Open error report.
??? Error using ==> emlmex
The note refers me to a target build log that has not been generated.
Note: I am using MATLAB 7.10.0 (R2010a)

Respuestas (2)

Mariam
Mariam el 27 de En. de 2011

0 votos

My problem is not resolved yet. Any help is appreciated

1 comentario

Kaustubha Govind
Kaustubha Govind el 14 de Jun. de 2011
Mariam: Could try:
function r = emcrand() %#eml
% The directive %#eml declares the function
% to be Embedded MATLAB compliant
r = 1; %pre-allocate to indicate type and size of r
r = rand();
And see if the error goes away?

Iniciar sesión para comentar.

eve
eve el 14 de Jun. de 2011

0 votos

I also have an almost the same problem. I am using Matlab 2009b on a mac. Does anyone know any possible solutions?

1 comentario

Kaustubha Govind
Kaustubha Govind el 14 de Jun. de 2011
Eve: Please post a new question and clarify the exact error message and preferably post a simplied version of your code that can be used to reproduce the error.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Compiler en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 20 de En. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by