has not been declared和does not name a type解决办法

来源:互联网 发布:淘宝的差评多久会生效 编辑:程序博客网 时间:2024/06/05 20:37

最近做项目发现明明包含了头文件,但编译却提示如下错误

src/SyncReceiver.h:58:15: error: ‘CoreCycle_t’ has not been declared
     bool Init(CoreCycle_t *pCoreCycle);
               ^
src/SyncReceiver.h:71:5: error: ‘CoreCycle_t’ does not name a type
     CoreCycle_t       *m_pCoreCycl


解决办法:采用前向声明 替换 原来的头文件包含:

class SyncReceiver;

calss SyncSender;



0 0