Using xmem with libs?

When I combine the following compile directives:
#memmap xmem
#use SF1000.lib

I get the following compile errors:
line 148 : ERROR SF1000.LIB : Undefined (but used) global label RAMtoSector
line 149 : ERROR SF1000.LIB : Undefined (but used) global label SectorToRAM
line 151 : ERROR SF1000.LIB : Undefined (but used) global label WriteRAM
line 152 : ERROR SF1000.LIB : Undefined (but used) global label ReadRAM
line 160 : ERROR SF1000.LIB : Undefined (but used) global label CheckFlashAddr
line 170 : ERROR SF1000.LIB : Undefined (but used) global label SF1000_Block_size
line 172 : ERROR SF1000.LIB : Undefined (but used) global label SF1000_Unit_Bytes

Do I need to add “memmap xmem” to my libs?

Why aren’t these variable defined?

Nevermind, I found the problem.

Besides calling xmem, I also had commented out the command: SF1000Init()

Once I called that command, everything compiled. Go figure.

It’s fairly normal in a lib to put the declerations for data used in the beginheader/endheader block for a function that MUST be used if the lib is being used. It stops memory being used up by variables that are not needed if the lib is not actually called.

Regards,
Peter