0
μαστόρια τα έχω βρει λιγο σκούρα με την extern στα structure, για την ιστορία γράφω στη σκατο mikroc που δεν ειναι gcc .
Λοιπόν μπαίνω στο ψητό
εστω ένα 1.c αρχείο
1.c
.........................Κώδικας:typedef struct Command { u8 command_1; u8 command_2; u8 command_ID_3; u8 command_Length_4; u8 wait_Response; }; Command check_Communication_Link = { /*.command_1 =*/ 0xF8, /*.command_2 =*/ 10, /*.command_ID_3 =*/ 0x78, /*.command_Length_4 =*/ 11, /*.wait_Response =*/ 1 };
στο 1.h
Κώδικας:extern Command check_Communication_Link;
και παίρνω error
9 402 ; expected, but 'check_Communication_Link' found protocol_commands.h