2024-07-05 12:51 AM
Hello, I recently had a compilation error with STM32CubeIDE 1.14.0. A json.h file is not found by the compiler, yet I have included the path in the project properties, as shown in the photo.
The file is present in the project/drivers/JSON directory. If I move the file to project/core/inc, the compilation works.
Another oddity, I can't find where the paths to project/drivers/NTC and project/drivers/OLED are registered? Yet the compilation works (without json.h).
Thank you.
2024-07-05 02:48 AM
Hello @guillaumefaye,
In the section Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Compiler > Include paths, you should include the path ../Drivers/JSON . For your second question, It's not necessary to add the paths ../Drivers/NTC and ../Drivers/OLED to the include paths unless they contain header files that your project requires.
2024-07-05 03:50 AM
In the section Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Compiler > Include paths, you should include the path ../Drivers/JSON .
Thanks but it is already included in the properties, see the photo.
2024-07-05 05:34 AM
Certainly! I mean you need to delete the entry "${workspace_Ioc:/${ProjName}/Drivers/JSON}" and manually add ../Drivers/JSON .
2024-07-05 05:40 AM
Thanks , I will try this.
2024-07-05 08:38 AM
Nop allways the same error......:frowning_face:
2024-07-05 09:35 AM - edited 2024-07-05 09:40 AM
Try <json.h> instead of "json.h".
Also note that relative paths like ../Core or ../Drivers can cause errors. Prefer absolute paths, such as the last include dir in your first post. Use the eclipse macros ${ProjectDir}, ${workspace_loc} and so on, or custom build variables .
2024-07-05 11:41 AM
Unfortunately it isn't work.
there is another strangeness, i remove all files folder and ref to json. It's compil but i can't see where is the path to ntc.h or oled.h , i had manualy add this, but I don't remember how.
In picture, we can see the project tree, compilation result , properties tree.
2024-07-05 11:57 AM
with the full link in the name, it compiles........without path link.
2024-07-05 12:01 PM - edited 2024-07-05 12:01 PM
Try to refresh the project (F5) , close and re-open and refresh again. Eclipse can act up sometimes... But there are no miracles, everything has explanation.