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
Actually, that's a Definition.
The Definition is what reserves the space; A Declaration just "declares" that the space is (assumed to be) defined elsewhere.
"there can be many declarations (and in many translation units) of a single global variable or function, there must be exactly one definition" c-faq.com/.../decldef.html
c-faq.com/.../index.html c-faq.com/.../index.html
To me, HIGHTECH C Compiler is special, mainly because the traditional PIC MCU is C unfriendly.
like:
HI-TECH C for PIC10/12/16 User's Guide 3.8.3 Function Duplication It is assumed by the compiler that an interrupt may occur at any time. As all functions are not reentrant (because of the dependance on the compiled stack for local objects, see Section 3.4.2 “Compiled Stack Operation”), if a function appears to be called by an interrupt function and by main-line code this could normally lead to code failure. HI-TECH C has a feature which will duplicate the output associated with any function called from more than one call tree in the program’s call graph. There will be one call tree associated with main-line code, and one tree for the interrupt function, if defined.
"To me, ... is special ..."
How does their "specialness" for that architecture differ from the "specialness" offered by this forum vendors' features supporting the roughly equivalent 8051 architecture and toolchain?
That is asked rhetorically, of course, because then:
To you, the C51 C Compiler is special, mainly because the traditional 8051 MCU is C unfriendly.
Please read the manual
Please read the manual: Read The equivalent Fine Manual.
Get a clue, dude. We choose Keil and HI-TECH toolchains above all others for their respective target architectures because they offer the best performance while also being the most compliant with the language standard. So as to not discourage discussion, I would be most interested to learn from news of industry developments to the contrary.
My development experience is very limited. So I incorrectly assume that most architectures and tool-chains are C friendly. Sorry for that.
Get a clue, dude.
*** henry, why are you always a ***?
We choose Keil and HI-TECH toolchains above all others for their respective target architectures because they offer the best performance while also being the most compliant with the language standard.
Speak for yourself, ***.
I have a copy of HI-TECH compiler because it was given to me for free. Otherwise, it would have been too expensive at any price.
Sorry for that.
Do not worry. *** is just being ***.