Witam wszystkich mam taki problem. Kompiluje złożony program w C i podczas kompilacji wyskakuje mi błąd:
array type has incomplete element type
a to są fragmenty z plików które odnoszą się do niego (tak mi się wydaje):
Kompilator pokazuje błąd tu:
//zawartość pliku struktura.h
extern struct menu_op openfiremenu[]; //tu pokazuje ten błąd
int CommandVer_func(void *pio);
int CommandStatus_func(void *pio);
int CommandStatusShort_func(void *pio);
//int CommandHelp_func(void **pio);
int CommandCtrlReg_func(void *pio);
int CommandStatReg_func(void *pio);
int CommandReset_func(void *pio);
int CommandHallValue_func(void *pio);
int CommandRegDump_func(void *pio);
int CommandMotSel_func(void *pio);
int CommandPsp_func(void *pio);
int CommandPp_func(void *pio);
int CommandPi_func(void *pio);
int CommandPlim_func(void *pio);
int CommandPmod_func(void *pio);
int CommandSff_func(void *pio);
int CommandSp_func(void *pio);
int CommandSi_func(void *pio);
int CommandSlim_func(void *pio);
int CommandCff_func(void *pio);
int CommandCp_func(void *pio);
int CommandCi_func(void *pio);
int CommandClim_func(void *pio);
int CommandGoto_func(void *pio);
int CommandTrajAcc_func(void *pio);
int CommandTrajSpd_func(void *pio);
int CommandTrajEnable_func(void *pio);
int CommandFdCtrlReg_func(void *pio);
Oto funkcjie menu_op i openfiremenu:
//menu_op
struct menu_op
{
char * opt;
int (*func)(void * pio);
char * desc;
};
//openfiremenu
struct menu_op openfiremenu[] = {
"openfire", stooges, "OpenFire Menu",
"ofv", CommandVer_func, "Displays version",
"ofs", CommandStatus_func, "Displays status",
"ofss", CommandStatusShort_func, "Displays short status (fewer parameters)",
"ofctrl", CommandCtrlReg_func, "Write to MOTOR_CONTROL_REGISTER",
"ofstat", CommandStatReg_func, "Read MOTOR_STATUS_REGISTER",
"ofreset", CommandReset_func, "Reset OpenFire",
"ofhall", CommandHallValue_func, "Read hall value",
"ofregdump", CommandRegDump_func, "Dump motor registers",
"ofmotsel", CommandMotSel_func, "Select motor to control",
"ofpsp", CommandPsp_func, "Set pos set-point",
"ofpp", CommandPp_func, "Set pos param P",
"ofpi", CommandPi_func, "Set pos param I",
"ofplim", CommandPlim_func, "Set pos error limit",
"ofpmod", CommandPmod_func, "Set pos modulo",
"ofsff", CommandSff_func, "Set speed feed-fwd",
"ofsp", CommandSp_func, "Set speed param P",
"ofsi", CommandSi_func, "Set speed param I",
"ofslim", CommandSlim_func, "Set speed error limit",
"ofcff", CommandCff_func, "Set cur feed-fwd",
"ofcp", CommandCp_func, "Set cur param P",
"ofci", CommandCi_func, "Set cur param I",
"ofclim", CommandClim_func, "Set cur error limit",
"ofgoto", CommandGoto_func, "Trajectory go to position",
"oftacc", CommandTrajAcc_func, "Sets trajectory acceleration",
"oftspd", CommandTrajSpd_func, "Sets trajectory max speed",
"often", CommandTrajEnable_func, "Trajectory enable",
"offdctrl", CommandFdCtrlReg_func, "Set FireDriver control register",
NULL,
};
I teraz pytanie jak rozwiązać ten błąd?? Z góry dzięki za pomoc.