unresolved externals : _timezone, _daylight

S

Stephen Ahn

Using : VS.NET 2003,

I'm attempting to create a mixed-mode C++ DLL (i.e. has both managed and
unmanaged code). When attempting to reference globals _timezone and
_daylight,
I get the following error at link time :

LINK : error LNK2020: unresolved token (0A000023) _timezone
LINK : error LNK2020: unresolved token (0A000024) _daylight
LINK : fatal error LNK1120: 2 unresolved externals


My link options look like this (remember, this is mixed mode) :

/INCREMENTAL /NOLOGO /LIBPATH:".\lib" /DLL
/NODEFAULTLIB:"LIBCMT.LIB" /NODEFAULTLIB:"LIBCMTD.lib"
/NODEFAULTLIB:"nochkclr.obj" /INCLUDE:__DllMainCRTStartup@12
/SUBSYSTEM:WINDOWS /NOENTRY msvcrt.lib kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
[... my objs]

Any ideas why the linker can't find these variables ?

TIA,
Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top