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 个评论

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

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品

提问:

JLP
2015-8-6

编辑:

JLP
2015-8-7

Community Treasure Hunt

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

Start Hunting!

Translated by