Hi all, I've a file named FONT.H where are located some text fonts in code. They are defined and initialized like this:
code U8 au8FontSystem5x8[]= { 0x00,0x00,0x00,0x00,0x00, /* Espace 0x20 */ 0x00,0x00,0x4f,0x00,0x00, /* ! */ ... ... }
typedef struct FONT_DEF { U8 u8Width; /* Character width for storage */ U8 u8Height; /* Character height for storage */ U8 *au8FontTable; /* Font table start address in memory */ } FONT_DEF; struct FONT_DEF *pptr; extern struct FONT_DEF code Font_System5x8 = {5, 8, au8FontSystem5x8}; extern struct FONT_DEF code Font_System7x8 = {7, 8, au8FontSystem7x8};
GLCD_Printf("Hello world", &FontSystem5x8);
***ÿERROR 202 IN LINE 35 OF GLCD.H: 'au8FontSystem5x8': undefined identifier
extern code U8 au8FontSystem5x8[]= { 0x00,0x00,0x00,0x00,0x00, /* Espace 0x20 */ 0x00,0x00,0x4f,0x00,0x00, /* ! */ ... ... }
Hey, no need to apologize -- your code uses the Keil keyword code, so you see, it was relevant to Keil tools after all. But really, where to place defs vs. decls is a pretty general 'C' thing.