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

extern type in 'C' and PUBLIC type in asm mismatch

Anyone seen this one?

I have a data structure in assembly (bit-mapped font) that I want to reference in C.

The 'C' code looks like this:

extern code unsigned char *FONT1;

and the assembly looks like this:
NAME FONT1
?CO?FONT1 SEGMENT CODE
PUBLIC FONT1
RSEG ?CO?FONT1
FONT1:

...

END

the linker error message is this:

***ERROR L103: EXTERNAL ATTRIBUT DO NOT MATCH PUBLIC SYMBOL: FONT1

the only other real clue I have is what's generated when I compile my "LCD" module with the "SRC" option. Here's a snip of that:

?PR?lcd_init?LCD SEGMENT CODE
?PR?_lcd_wr_image?LCD SEGMENT CODE
?DT?_lcd_wr_image?LCD SEGMENT DATA OVERLAYABLE
?PR?lcd_clr?LCD SEGMENT CODE
?PR?_lcd_wr_char?LCD SEGMENT CODE
?DT?_lcd_wr_char?LCD SEGMENT DATA OVERLAYABLE
?PR?_lcd_wr_string?LCD SEGMENT CODE
?DT?_lcd_wr_string?LCD SEGMENT DATA OVERLAYABLE
?PR?_lcd_set_line?LCD SEGMENT CODE
?PR?lcd_status?LCD SEGMENT CODE
?PR?lcd_title?LCD SEGMENT CODE
?CO?LCD SEGMENT CODE
EXTRN CODE (FONT1)
EXTRN CODE (?C?CLDPTR)
PUBLIC LCD_DATA
PUBLIC LCD_CMD
PUBLIC lcd_title
PUBLIC lcd_status
PUBLIC _lcd_set_line
PUBLIC ?_lcd_wr_string?BYTE
PUBLIC _lcd_wr_string
PUBLIC _lcd_wr_char
PUBLIC lcd_clr
PUBLIC _lcd_wr_image
PUBLIC lcd_init

Notice that the FONT1 extern reference does not include the code segment prefix, but seems to be associated with the ?CO? segment of the local module locally...hmmm... maybe that's OK...

Anyway, thanks for any input!

-ai

0