编译文件a.c时,提示: undefined reference to `xxx-func`
xxx-func 定义在b.c中,且在b.h中extern声明了。且a.c中也include了b.h.
最后是怎么解决的呢:调整了下a.c中include们的位置,把include "b.h"向上调了几行越过了几个其他的include。
然后就顺利编译通过了。
编译文件a.c时,提示: undefined reference to `xxx-func`
xxx-func 定义在b.c中,且在b.h中extern声明了。且a.c中也include了b.h.
最后是怎么解决的呢:调整了下a.c中include们的位置,把include "b.h"向上调了几行越过了几个其他的include。
然后就顺利编译通过了。