Share global variable between C and assembler

Hi All,

I need to share a global protected variable between my main .c file and one of the Rabbit .lib assembler files I’ve had to modify.

I have the variable defined in the .c file as:

protected char g_isUpgrading;

and am trying to reference it from the .lib file as:

    ld (g_isUpgrading),hl    ;set my_global_flag = hl

I am getting a compile error however:

line 223 : ERROR MINILOADER.LIB : Undefined (but used) global label g_isUpgrading

Any ideas on how to fix this?