Hello,
i have a sketch which is using some c files for a lvgl gui.
I would like to call a function which is located in the ino from one of these files.
But i always got the error message undefined reference to that function.
i tried a few things but none of them worked.
Error message
C:\Users...\events_init.c:234: undefined reference to `set_led_brightness'
collect2.exe: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
I have the test funtion set_led_brightness
in the c file is use: extern void set_led_brightness (uint8_t val);
and the function call. set_led_brightness (VAL);
the function is located in my ino file:
void set_led_brightness (uint8_t val)
{
Serial.print("new brightness val:");
Serial.print("val");
Serial.print("\n\r");
}