You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a really important feature for library developers, since it allows compile-time optimizations based on conditional compilation without requiring the user to edit files in the library.
The include path search order should be: first the sketch dir, and then fall back to the library. This lets a library developer deliver a default version of the header inside the library. It would be used if the sketch does not provide one, and has the secondary advantage of serving as a template.
To make this more formal, perhaps introduce a new file extension like ".cfg" or ".libcfg"? Having a different extension allows the nice convention that if "libname.h" is the main include file for the library, then "libname.cfg" is the config file that goes with it. For bonus points, "Sketch->Include Library" could copy the "libname.cfg" from the requested library into the sketch to seamlessly provide a template ready for the user to edit.
Hello,
I am writing a library for Arduino and I want to make it configurable at compile time with some defines in include file.
So I open
~/.arduino15/packages/arduino/hardware/avr/1.6.13/platform.txt
file and add -I{build.path}/sketch C++ compile option:
At this time all compiles just fine.
I have taken this option from ChipKIT platform.txt, by the way:
http://chipkit.net/wiki/index.php?title=ChipKIT_core
The text was updated successfully, but these errors were encountered: