How am I supposed to properly set up a multi-file project in the ide (without creating a new library, if possible). I.e. I have the standard .pde file but I also want to use functions, etc. separated out in some other (C or C++) files. I can include the headers all right but cannot come to compile the code with other files.
For the sake of simplicity I have three files in the same directory (..../main):
main.pde which is as follows
#include "fruit.h"
void setup()
{
apple = peach();
}
void loop()
{
Serial.println(apple);
}
then I have fruit.h as follows:
int apple;
int peach();
and lastly fruit.c:
#include "fruit.h"
int peach()
{
return 5;
}
When I try to "Verify" the main.pde file in the IDE it gives me an "In function 'setup()': Undefined reference to peach()" error...
What do I do wrong?