Re: ConvertStringToBSTR linking error
- From: "NickP" <a@xxxxx>
- Date: Fri, 10 Feb 2006 17:26:43 -0000
I managed to get rid of the error finally by recompiling another library
that I hadnt mentioned I was linking in the list. It now doesnt look for
Cheers for your help and sorry for my delay getting back to you. And
cheers for telling me the reason why this happens, very informative!
"Bruno van Dooren" <bruno_nos_pam_van_dooren@xxxxxxxxxxx> wrote in message
I have a VC Win32 application compiling under VS.NET 2003 no problems,
but when attempting to compile under VS.NET 2005 I am recieving linker
problems. The only main difference between the 2 systems is that I am
using the latest platform SDK on the 2005 system in order to utilize the
latest DirectX (DirectShow) SDK.
Anyway, the linker error I'm recieving is
Error 79 error LNK2019: unresolved external symbol "wchar_t * __stdcall
_com_util::ConvertStringToBSTR(char const *)"
(?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function
"public: __thiscall _bstr_t::Data_t::Data_t(char const *)"
Error 80 error LNK2019: unresolved external symbol "char * __stdcall
(?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function
"public: char const * __thiscall _bstr_t::Data_t::GetString(void)const "
Error 81 error LNK2001: unresolved external symbol "char * __stdcall
Error 82 error LNK2001: unresolved external symbol "char * __stdcall
Error 83 fatal error LNK1120: 2 unresolved externals Raptor - <filename>
I can't find any references to this call in any of my source code so I
can only presume that something else I am linking in is requiring this
The libraries I am including and also include in VS.NET 2003 which
compiles perfectly are...
What confuses me most is why this would work in 2003 and not 2005?
Had anyone else experienced this problem and have any kind of a resolve?
Thanks I'm eagerly awaiting some answer, cheers in advance!
from the ConvertStringToBSTR documentation in MSDN 2005,
Lib: comsuppw.lib or comsuppwd.lib (see /Zc:wchar_t (wchar_t Is Native
Type) for more information)
in MSDN2003, it specifies commsupp.lib, not comsuppw.lib
you lib list does not include comsuppw.lib. Try to add it.
I seem to remember someone mentioning on this list that this problem is
by the fact that the default for wchar_t changed from VC2003 to VC2005.
Remove only "_nos_pam"