在a.h 中声明
typedef struct
{
uint16_t Timer;
uint8_t Timer_Flag;
} Struct_A;
在b.h 中声明
#include "a.h"
typedef struct
{
Struct_A m_a;
} Struct_B;
在b.C 中
#include "b.h"
Stcuct_B b = {0};
void Test(void)
{
//none
}
编译错误为
..\\APP\b.h(33): error: #5: identifier "Struct_A" is undefined