Itaniun & Managed C++ Extensions: Unresolved token 'Sleep'

Hi folks. I hope someone might be able to shed a little light on this as it's got me stumped.
We wrote a small .NET DLL using the Managed Extensions for C++ using Visual Studio 2003 and it worked like a dream on our 32-bit x86 Windows machines. Now however we want to rebuild the same thing on an Itanium using Windows Server 2003 and the Visual Studio 2005 beta 2 and we've hit a problem getting it to link.
We're compiling at the command-line with:
cl /LD /MD /G2 /clr:oldSyntax /Feour-assembly.dll oursrc.cpp StdAfx.cpp /link /MACHINE: IA64 /NODEFAULTLIB: libcmt.lib /NOENTRY mscoree.lib
However, we get the following errors at the linking stage:
MSVCMRT.lib(mstartup.obj) : error LNK2028: unresolved token (0A00008E) "void __cdecl Sleep(unsigned long)" (?Sleep@@$$J0YAXK@Z) referenced in function "private: void __cdecl <CrtImplementationDetails>::LanguageSupport::_Initialize(void)" (?_Initialize@LanguageSupport@<CrtImplementationDetails>@@$$FAEAAXXZ)
MSVCMRT.lib(mstartup.obj) : error LNK2019: unresolved external symbol "void __cdecl Sleep(unsigned long)" (?Sleep@@$$J0YAXK@Z) referenced in function "private:void __cdecl <CrtImplementationDetails>::LanguageSupport::_Initialize(void)" (?_Initialize@LanguageSupport@<CrtImplementationDetails>@@$$FAEAAXXZ) xprmdn-helper.dll : fatal error LNK1120: 2 unresolved externals
I'm presuming I have to link in something else to resolve these dependancies, but have no idea what... advice on this matter would be very much appreciated. :)
[1556 byte] By [JamesFarmer] at [2008-2-10]
# 1

Are you using the Itanium version of cl? (If you're in the IDE the platform type should be Itanium, if you're doing it on the command line you should be using the Itanium command prompt).

Thanks,

Kang Su Gatlin
Visual C++ Program Manager

KangSuGatlin at 2007-9-9 > top of Msdn Tech,.NET Development,64-Bit .NET Framework Development....
# 2
Hi.

Yes, I believe we are using the Itanium version of cl - however while checking this I noticed the problem, that our build script was adding "VC\lib" to the %LIB% environment variable as well as "VC\lib\ia64" - I removed "VC\lib" and the build succeeded.

Thanks for putting us on the right track!

JamesFarmer at 2007-9-9 > top of Msdn Tech,.NET Development,64-Bit .NET Framework Development....
# 3
Cool. Smile

Thanks,

Kang Su Gatlin
Visual C++ Program Manager

KangSuGatlin at 2007-9-9 > top of Msdn Tech,.NET Development,64-Bit .NET Framework Development....

.NET Development

Site Classified