This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil uVision compiling with API Issues

I had recently purchased a couple VL53L0X series Distance Sensors from STMicroelectronics and when working on them I was pleased to see that the company offered an API in order to easily read in the measurements. However I ran into a few problems with getting the API implemented into a Keil Project.

Here's the current File Structure: 

The folder downloaded from with the API has been placed right under my C: drive in this directory: C:\Keil_v5\APIs\VL53L0X_1.0.2\Api

The children folders of the API folder is as follows: ../core/inc , ../core/src , ../platform/inc , ../platform/src

In my Keil project, following an example provided by STMicroelectronics, I include the 'vl53l0x_api.h' file located in /core/src folder. I also have the C/C++ include paths to look in all of the folders inside of the Api folder.

However the issue arises when I attempt to compile the code. A few of the files in the API try to include the 'Windows.h' file but are unable to find them. 

Naturally I am missing the include path to the Windows SDK and that particular header, however when I add 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um'  folder to the Include Paths variable, because of the space between 'Program' and 'Files' ( I believe ) the compiler errors out stating: 

Error: C4065E: type of input file 'Files' unknown

So to resolve this, I ended up copy the folder with windows.h into a folder inside the API folder, but that lead to another file  in a folder which in turn lead to another file and then another etc. Point is that definitely can not be the way its supposed to be implemented. 

There has to be something major, yet small, that I am missing but any input would be must appreciated. But I guess my question in short would be is there a Pack that anyone knows of with these dependencies or some better way to point Keil to where to read the 'windows.h' file and it's dependencies? 

This is all being ran uVision V5.16a. Currently FreeRTOS is added to the project and I plan on adding the HAL Library for the STM32F4xx board that this will be ran on. 

-Thank you and All the Best, Kevin 

Parents Reply Children