I’m working on a current project that would benefit from the use of libraries to get some room in main.
Everything works pretty well in one file, but when I try to turn my functions into libraries, I’m having a few issues. (library is for a special case OLED Character screen).
-I’m just writing a .c file and a .h file.
-Both files are stored in the same directory as my .ino file, and I’m using " " for my #includes, instead of < >
-I have included “Arduino.h” in my .c library file.
There’s way to much to post in as far as code goes, but the main error message I’m getting is :
ccpNAShc.ltrans0.o:(.text+0x890): undefined reference to `outputS(char*, int)’
where “outputS(char*, int)” is one of the functions in my library.
I’m getting this message for every line I’ve called the function on in main, (or loop? I guess)
So I’m pretty sure the compiler is having trouble with my include statement.
I haven’t tried a direct path, but this is hopefully going to be an open source project, so that would be unfortunate.
All the library tutorials I’ve seen have been in C++ with objects in the main file, is there no way around this? OOP just really seems like overkill for something that you’re not needing more than one instance of.
-Thanks for reading!