I'm pretty sure you need to build the C code with the compiler option --mem_model:data=far. This wiki article says a dynamic library ...
Must use far DP or absolute addressing to access its own data as well as data that it imports from other modules
I'll get confirmation on this.
Thanks and regards,
-George