hello,
i want to declare a bit flag in the header file which i have used in several C files. for ex: i have declared a flags like......
bit isr_set=0; bit buferflg=0;
These flags are used in 2-3 more C files.for that i am getting a eroor message
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: BUFERFLG MODULE: XXXXXXXXXXXXXXXXXXXXX
can u please tell me how can i declare these type of multiple declarations.
Ever heard about the "extern" keyword?
If not, I think it's time to look for a good book on C programming, since the difference between definitions and declarations are vital knowledge. There is probably also a lot of other things you could learn by spending a bit of time studying the language and how to use it.
c-faq.com/.../decldef.html and links therein.
Indeed.
You need to study the standard language first, and understand the standard stuff.
c-faq.com/.../index.html
Once you understand the standard stuff, you then need to study the Keil C51 Manuals to understand their particular non-standard proprietary stuff:
http://www.keil.com/support/man/docs/c51/c51_extensions.htm
http://www.keil.com/support/docs/1175.htm