raspberrypi / pico-vscode

The official VS Code extension for Raspberry Pi Pico development. It includes several features to simplify project creation and deployment.
https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico
Mozilla Public License 2.0
132 stars 16 forks source link

includePath from IntelliSense Configuration not transferred correctly to build.ninja #108

Closed vansterpc closed 1 month ago

vansterpc commented 1 month ago

Added include paths in the IntelliSense Configuration editor (which is translated into the c_cpp_properties.json). However, when Configure CMake is run the include paths is not correctly transfered to the build.ninja file. This causes the compilation to fail.

will-v-pi commented 1 month ago

Yes, that is an IntelliSense configuration, so will only affect the IntelliSense and will not affect compilation at all. To include a file in compilation, you need to add the appropriate lines to CMakeLists.txt - see the CMake documentation for more details. This should also fix the IntelliSense, so you shouldn't need to edit that file in the first place.

vansterpc commented 1 month ago

Thanks, adding the include_directories() statement in the CMakeLists.txt did fix the issue.