Using libs in ui_events

What do you want to achieve?

I want to manipulate a .txt file on a SD card through a button click. So i want to include The SD.h library and a file class File myFile; that i have defined in ui.cpp in my ui_events.c. However i can’t include the class, most likely because it a .c file. Is there a way around this or do i have to bring my functions in my ui.cpp?

What have you tried so far?

I tried to implement the class using „extern File myFile;“ My next guess would be to move everything to move everything from ui_events.c to ui.cpp, however it feels like a workaround.

Screenshot or video

Others

  • SquareLine Studio version:
  • Operating system:
  • Target hardware:

You can select in SquareLine Studio Project Settings to export the ui_events file as ui_events.cpp. Maybe that solves your problem without needing to move your inclusions/referenses from ui_events.cpp to ui.cpp.