i have defined an array in header file "Variables.h" and include it to source files. extern char LCD[11] = {0xF6, 0xC0, 0x6E, 0xEA, 0xD8, 0xBA, 0xBE, 0xE0, 0xFE, 0xFA, 0x00};
when am trying to compile i get the next message:
Build target 'Target 1' assembling LPC2300.s... compiling Main.c... compiling Interrupts.c... compiling Init.c... compiling LCD_ML1001.c... linking... Second Counter + TI8148.axf: Error: L6200E: Symbol LCD multiply defined (by interrupts.o and main.o). Second Counter + TI8148.axf: Error: L6200E: Symbol LCD multiply defined (by init.o and main.o). Second Counter + TI8148.axf: Error: L6200E: Symbol LCD multiply defined (by lcd_ml1001.o and main.o). Second Counter + TI8148.axf: Not enough information to list image symbols. Second Counter + TI8148.axf: Not enough information to list the image map. Second Counter + TI8148.axf: Finished: 2 information, 0 warning and 3 error messages. Target not created
the answer is here http://www.keil.com/support/docs/3198.htm
i defined the type of array in header file than included it to c files and than i defined values of array elements in main.c before main function
Yes - that is exactly what Per said to you.
It is also what the 'C' FAQ link said.
And what any good 'C' textbook would tell you.
Again, it is nothing specifically to do with Keil - it is standard, basic 'C' stuff.
"i defined the type of array in header file"
Do you mean you provided an extern Declaration of the array?
Defining a type is something different.
"i defined values of array elements"
You mean you provided a Definition of the array - with initialisation.
I think you still need to spend some more time reviewing these topics with a 'C' textbook or two...