How to call the static function from another c file?

前端 未结 6 1637
谎友^
谎友^ 2021-02-07 22:48

I want to call a static function from another C file. But it always show \"function\" used but never defined.

In ble.c

6条回答
  •  遥遥无期
    2021-02-07 23:08

    You get this message because you have declared the function to be static. So the implementation is only visible inside your .c file. Try removing the static from both your .h and .c, this should allow your function to be seen.

提交回复
热议问题