Grazie dei suggerimenti, ho fatto come hai detto ma c'è ancora un problema:
codice:
#include <stdio.h>
#include <stdlib.h>
#include "funzioni.h"
int main (void) {
int id, fam, cost, lungh, alt;
char c;
struct component p;
do {
scanf("%c", &c);
switch(c) {
case 'c': scanf("%d%d%d%d%d", &id, &fam, &cost, &lungh, &alt);
p = build_component(id, fam, cost, lungh, alt);
break;
case 'a': printf("prova speriamo bene\n");
break;
}
} while(c != 'f');
return 0;
}
compilando:
/tmp/cc1Deopb.o: In function `main':
componenti.c
.text+0x81): undefined reference to `build_component'
collect2: ld returned 1 exit status