Hello,
I have some functions that id like to use in many projects since they are ease some tasks tremedously. So far right now ive been using a HelpFunc.h header in the include directory which worked great. Problems occured when I tried to use these functions in more places like a .h and/or .cpp file for a private libary. Even though I have include guards in my header it creates an error with redefining functions of the header content. I googled some stuff about it and apparently I shouldnt straight define the functions in the header. So i just declared them there and made a .cpp file for the definitions. This hasnt helped as well.
Ive already made lots of libaries and just headers for my projects but never encountered this persistent error. Could you please enlighten me to how exactly and in which order does the compiler take its .h and .cpp files and on wether there is a better solution to my case.
In short I basically wanna have some arduino like functions (digitalWrite) which I can use anywhere. In main.cpp, in include.h and in bar.h or bar.cpp.
Thanks in advance, for your time!