I have created an event with a button that calls a function called calibrate. i clicked don’t export function, as I thought this would mean it would look in the main ui.ino. I created a void calibrate() in the main ino but I keep getting this message.
e:\My Drive\NEW\NEW\SquareLine_Project\libraries\ui\src/ui.c:157: undefined reference to `calibrate’
You’ve already defined it in ui.ino, and you’re trying to use it in your ui.c. Go through these steps:
Declare your functions in ui.h - stick a void calibrate(); along with the rest of the declarations in that file
Look in ui_events.c, and if there are any conflicting function declarations, delete it since it will conflict with what you have in ui.ino, but you should be fine to skip this step since you checked off “don’t export function”
Delete any custom function declarations in ui_events.h since you already declared them all in ui.h
Any time you want to use a custom function, you have define it somewhere (like you did in the ui.ino) AND declare it in the header file (ui.h).