error forward declaration of xxx

来源:互联网 发布:手机相机优化算法 编辑:程序博客网 时间:2024/06/05 19:30

问题:

file1 include file2,file2 中用到了某个数据结构 A(定义在file3 中)的定义,但file1 和file2 都没有include file3,或file1 所在的工程没有设置 file3 的路径,造成编译器不能识别 A

解决:

file1 中include file3,如有必要,在工程文件中设置file3 的路径