Adding compiler flags to arduino-cli affects compilation

Hi

Im trying to specify my include directory to the compiler, but adding any flags to arduino-cli using --build-property build.extra_flags results in linker issues, here’s a picture:

In that image i’ve only added the 02 flag for demonstration purposes. But if I add the -I flag, it fails in a similar way. Is there something im missing when it comes to the build process? Can anyone let me know what I’m doing wrong?

Thanks
Sabith

Okay so I figured out the issue, it’s related to this:

Is there any way I can add extra build flags when compiling on your platform?

This is more a questions towards the Arduino-CLI community and not to us, but I can show how I am adding compiler flags:

When using Arduino-CLI I am adding extra flags like this:

.\Windows\arduino-cli.exe  compile -b rak_rui:stm32:WisDuoRAK3172EvaluationBoard --build-property compiler.cpp.extra_flags="-DMY_DEBUG=1  -DAUTO_DR=1" --output-dir .\RUI3-Modular\flash-files --build-path .\RUI3-Modular\build --build-cache-path .\RUI3-Modular\cache --no-color --verbose --library .\RUI3-Modular\libraries .\RUI3-Modular\RUI3-Modular.ino

I have to put the flags into ""

--build-property compiler.cpp.extra_flags="-DMY_DEBUG=1  -DAUTO_DR=1"

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.