From: Jan V. B. <jan...@ad...> - 2001-04-20 07:30:08
|
Hello all, I've encountered the following problem when defining some text-strings in a library (*.h) file. I declare them as: #ifndef _STRINGS_H_ #define _STRINGS_H_ code unsigned char string[] = "some piece of text"; xdata unsigned char string2[] = "another piece of text"; #endif // _STRINGS_H_ After compiling and loading it into my microcontroller, I see that they are declared at the start and end of my code (when browsing codespace). Why is that? How can I avoid this waste of codespace? When I declare them into the sourcefile directly, they are only declared once, but some of them I need in multiple sourcefiles. Sometimes the compiler gives a warning about it (declaring these things twice), sometimes (mostly?) not. Greetings, Jan Jan Van Belle E-mail: Jan...@ad... HAM-mail: on...@on... |