MATLAB function block Simulink 255 error

I want to integrate C code using the MATLAB function block( Integrate C code ). When I run the model the next error occurs:
"Building with 'gcc'. In file included from ...work/slprj/_sfprj/untitled1/_self/sfun/src/slprj/_sfprj/untitled1/_self/sfun/src/untitled1_sfun.c:4:0:
...work/slprj/_sfprj/untitled1/_self/sfun/src/slprj/_sfprj/untitled1/_self/sfun/src/untitled1_sfun.h:23:20: fatal error: myheader.h: No such file or directory
gmake: * [untitled1_sfun.o] Error 255".
My header file is on work directory path. Any suggestion?
------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------
I could solve it, but a new error has ocurred.
The new error is:
MEX completed successfully.
/.../MATLAB/R2015a/bin/mex -silent LDFLAGS="\$LDFLAGS " -output untitled1_sfun.mexa64 untitled1_sfun.o untitled1_sfun_registry.o c2_untitled1.o mysource.o
L/.../MATLAB/R2015a/bin/glnxa64 -lmwsf_runtime-
L/.../MATLAB/R2015a/bin/glnxa64 -lfixedpoint-
L/.../MATLAB/R2015a/bin/glnxa64 -lut-
L/.../MATLAB/R2015a/bin/glnxa64 -lemlrt-
L/.../MATLAB/R2015a/bin/glnxa64 -lmwmathutil-
L/.../MATLAB/R2015a/bin/glnxa64 -lmwblas-
L/.../MATLAB/R2015a/bin/glnxa64 -lmwsl_log_load_blocks-
L/.../MATLAB/R2015a/bin/glnxa64 -lmwsimulink-
L/.../MATLAB/R2015a/bin/glnxa64 -lmwipp c2_untitled1.o: Function `sf_gateway_c2_untitled1':
c2_untitled1.c:(.text+0x168d): reference to `mysource' not defined collect2: error: ld return 1 out state
gmake: *** [untitled1_sfun.mexa64] Error 255
mysource is my C code to integrate. I call it in the MATLAB function with 'coder.ceval('mysource',u1,u2,u3);'

2 Comments

Is your "work directory path" included by way of a "-I" on the command line or in a make file?
In a make file

Sign in to comment.

Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products

Asked:

JLP
on 6 Aug 2015

Edited:

JLP
on 7 Aug 2015

Community Treasure Hunt

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

Start Hunting!