C51: GET ERROR A45: USING IN-LINE ASSEMBLER
Information in this article applies to:
I'm trying to reference a global variable using in-line assembler, but when the project builds I get the following error:
<module_name>.SRC (line) Error A45: UNDEFINED SYMBOL (PASS-2)
The global variable is defined as extern in my header file. What's wrong?
Your C code does not reference that global variable, so the compiler does not add it to the .SRC file when it is built. In these rare cases, you will have to add the external declaration as in-line assembly code for that module as follows:
#pragma asm EXTRN DATA (variable_name) #pragma endasm
Last Reviewed: Tuesday, February 20, 2007
of your data.