flipperdevices / flipperzero-ufbt

Compact tool for building and debugging applications for Flipper Zero.
https://pypi.org/project/ufbt/
GNU General Public License v3.0
494 stars 36 forks source link

includePath property from c_cpp_properties.json #28

Closed kevin-tubio closed 7 months ago

kevin-tubio commented 7 months ago

Problem Description: I'm encountering an issue where ufbt nor intellisense neither recognizes nor utilizes the includePath property specified in the c_cpp_properties.json file. Due to this, the build process encounters errors related to missing includes. Any suggestions, guidance, or insights to rectify this problem would be immensely appreciated. Thank you for your assistance!

Expected Behavior: IntelliSense should accurately provide code suggestions, error checking, and code navigation based on the includePath specified in c_cpp_properties.json. ufbt should consider and utilize the includePath property from c_cpp_properties.json to locate header files and dependencies required during the build process.

Screenshots:

image image image image
hedger commented 7 months ago

When "compileCommands" has a valid JSON with compiler commandlines, "includePaths" is not used. And it's not utilised by the build system that performs the actual .fap compilation, it's only needed for VSCode's language server.

Your problem is that you're including a header from "include" directory from a .c file in project root. Specify proper path - #include "include/hello_flipper_app.h" or move that header to project root.