stm32工程编译时遇到这个错误,显示HAL_StatusTypeDef没有被定义,但是go to definition又能找到定义
后来在网上寻找解决办法,结果发现竟然是
#include "stm32l4xx_hal_spi.h"
#include "stm32l4xx_hal.h"
这两个的顺序问题,#include "stm32l4xx_hal.h"头文件包含必须在最前面,真是抽象
#include "stm32l4xx_hal.h"
#include "stm32l4xx_hal_spi.h"
这样就没有错误了,完全不知道这是什么鬼要求!
标签:include,hal,LIB,stm32l4xx,StatusTypeDef,HAL,identifier From: https://www.cnblogs.com/well123/p/18186736