I'm unable to access some const objects from a DLL despite the fact that they are exported and other items from the DLL, functions and classes are importing correctly.
Is their some rule against this or am I just being thick again and not spotting the obvious mistake?
extern __QOR_INTERFACE( __ARCHQOR ) const CGPReg eax;
__QOR_INTERFACE( __ARCHQOR ) const CGPReg eax( nsCodeQOR::_Initialize(), REG_EAX );
In the debugger I can hit the line above proving that
eax
gets initialised on load of the DLL.
Depends shows the export
?eax@nsx86@nsArch@@3VCGPReg@12@B
at ordinal 1003 but building the exe which imports the symbol gives the error:
TestArchQOR.obj : error LNK2001: unresolved external symbol "class nsArch::nsx86::CGPReg const nsArch::nsx86::eax" (?eax@nsx86@nsArch@@3VCGPReg@12@B)
The nsArch::nsx86::CGPReg type is also exported and given that the export and the claimed missing import symbols match I am properly confused.com