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

Link error on missing symbol that is there.

The symbol X shows up in the link map, but the linker still generates unresolved symbol errors for X in main. Any ideas?

File Main.c:

extern xdata X[];
static char xdata* p = X;

void main( void )
{
}

File Sub.c:

char xdata X[] _at_ 0x0012;

static char xdata* p = X;

Parents
  • You haven't declared a type for X in the extern in Main.c, so 'C' will assume int, but in the definition in Sub.c you've specified char.

    I would expect to get some sort of complaint from the Linker about this, though perhaps not "unresolved!"

Reply
  • You haven't declared a type for X in the extern in Main.c, so 'C' will assume int, but in the definition in Sub.c you've specified char.

    I would expect to get some sort of complaint from the Linker about this, though perhaps not "unresolved!"

Children