My files are
// main.c
#include \"add.c\"
int main(void) {
int result = add(5,6);
printf(\"%d\\n\", result);
}
and
you shouldn't include c-files in other c-files. Instead create a header file where the function is declared that you want to call. Like so: file ClasseAusiliaria.h:
int addizione(int a, int b); // this tells the compiler that there is a function defined and the linker will sort the right adress to call out.
In your Main.c file you can then include the newly created header file:
#include
#include
#include
int main(void)
{
int risultato;
risultato = addizione(5,6);
printf("%d\n",risultato);
}