This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how can i declare bit flag in header file ?

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.

Parents
  • 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.

Reply
  • 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.

Children