The project builds on Win32 platform, but not on x64.
Full error message: dllentry.obj : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
The dllentry.cpp compiles on both platforms. It contains the external declarations:
extern CFactoryTemplate g_Templates[];
extern int g_cTemplates;
g_Templates[] is then used in two functions:
__control_entrypoint(DllExport) STDAPI DllGetClassObject(__in REFCLSID rClsID,
__in REFIID riid, __deref_out void **pv)
{
...
for (int i = 0; i < g_cTemplates; i++)
{
const CFactoryTemplate * pT = &g_Templates[i];
}
}
and
DllInitClasses(BOOL bLoading)
{
...
for (int i = 0; i < g_cTemplates; i++)
{
const CFactoryTemplate * pT = &g_Templates[i];
}
}
I checked all the libraries in the project settings and all seems to be OK, the 64 bit versions are used. What should I do to make the project build for x64 platform?
extern
from the lineextern CFactoryTemplate g_Templates[];
– KonstantinL