Relevant header included but fails with "unknown type"
I am porting a wifi example from STM32Cube_FW_L4_V1.11.0 into my own project. The STM example and my project are both using the B-L475E-IOT discovery kit which has an onboard wifi module accessed via SPI. I generated my project skeleton code for SW4 using STM32CubeMX by selecting the relevant board and enabling relavent SPI HAL so that all is included in the project folder.
The code fails to compile complaining that the type SPI_HandleTypeDef is not defined in the es_wifi_io.h file that I copied to my project.
The es_wifi_io.h file includes stm32l4xx_hal.h, which in turn includes the project specific stm32l4xx_hal_conf.h, which defines HAL_SPI_MODULE_ENABLED and in turn includes stm32l4xx_hal_spi.h which is where SPI_HandleTypeDef is defined. All these appear correctly in the project, and the SW4 project C/C++ Build settings list all relevant include paths for these files.
The STM32Cube example works fine, but my project complains about this missing type. Is there something I am missing in the project settings that could be causing this?
Regards
Mikael