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

Warnings L1 and L2

What does it mean when you have an "unresolved external symbol"? The manual claims that the variable is not PUBLIC, however, I don't see how that's the case. I am getting warnings L1 and L2 when I put the following line in one file:

sbit var1 = P1 ^ 7;

and I put this in another file trying to access that variable:

extern bit var1;

I know that the files can "see" each other because other "Public" variables in these files work fine. Also, P1 is specified in the include REG51.H file. Is my syntax wrong?

Parents
  • It appears to me that you can extern sbit if you follow the method on page 94 of the C51 compiler manual (under "Bit-addressable Objects"). Unfortunately, I must be doing something wrong because that method doesn't seem to work. (Although, as buggy as this Keil program seems to be, it wouldn't surprise if what I was doing was just what I was supposed to do, and the program just doesn't work...)

Reply
  • It appears to me that you can extern sbit if you follow the method on page 94 of the C51 compiler manual (under "Bit-addressable Objects"). Unfortunately, I must be doing something wrong because that method doesn't seem to work. (Although, as buggy as this Keil program seems to be, it wouldn't surprise if what I was doing was just what I was supposed to do, and the program just doesn't work...)

Children
No data