Hi there,
in my Build directory i have a myCode.c and myCode.h . myCode.h defines void YourDevice_SayHello();. I changed the Makefile to include the myCode.c file.
Now i added a Button to my GUI that calls a Slot method in Device.mySlot(). All that contains is a call to YourDevice_SayHello();. Of course it is enclosed in !$prototyper and native(){} blocks.
I also added a Inline block with one line: #include "myCode.h"
After building and transferring my project to the target devices (Raspberry Pi) and running make, i get warnings about this:
Compiling ./GeneratedCode/Views.c
Compiling ./GeneratedCode/Application.c
./GeneratedCode/Application.c: In function ‘ApplicationDeviceClass_mySlot’:
./GeneratedCode/Application.c:1037:5: warning: implicit declaration of function ‘YourDevice_SayHello’ [-Wimplicit-function-declaration]
YourDevice_SayHello();
^
In file included from ./GeneratedCode/Application.c:1087:0:
./myCode.h: At top level:
./myCode.h:3:6: warning: conflicting types for ‘YourDevice_SayHello’
void YourDevice_SayHello();
^
./GeneratedCode/Application.c:1037:5: note: previous implicit declaration of ‘YourDevice_SayHello’ was here
YourDevice_SayHello();
^
Compiling ./GeneratedCode/Templates.c
Compiling ./GeneratedCode/Flat.c
So how to i properly add my header file so that GUI and also custom code is aware of my function definitions?
All that said - the code itself works. The application compiles and correctly outputs "Hello" each time i press the GUI button, so i am presuming all i have to do is to find out where to add my #include myCode.h
Thanks!