What does "function ?? declared implicitly" means?

6 次查看(过去 30 天)
Hi, I'm trying to integrate my c code to simulink.
I made a header file and a source file named file.h and file.c.
and there is a function named function1 and the code is stated below.
static double a;
a = a+1;
return a;
Next, I made a C caller block and typed like below.
After that, I ran my code and the error is stated like this.
In line 1:error: 223, function "function1" declared implicitly
| function1();
| ^
How can I solve this error?

回答(1 个)

Bruno Luong
Bruno Luong 2023-9-11
编辑:Bruno Luong 2023-9-11
you need add double as return type for your function prototype and declaration
double function1(void);
double function1(void)
  2 个评论
lim daehee
lim daehee 2023-9-12
Dear Bruno Luong,
I finally found my problem.
I forgot including my c files in my simulation target..
Thanks for your help:)





Community Treasure Hunt

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

Start Hunting!

Translated by