Hi All,

I am porting a wmi event provider dll from 32 to 64 bit. I have WindowsXP
64bit with Visual Studio 2005. I made a 64 bit configuration in my project.
Everything compiles but I get two unresolved external references in the
link. Both are contained within FrameDyn.lib/dll. I will focus only on one
since the fix is probably the same for both. As you can see from below, the
error is looking for an entry point named ?GetDMTF@WBEMTime@@QEBAPEA_WH@Z.
When I run dumpbin /EXPORTS on the two FrameDyn.lib files installed in the
VisualStudio path, each one has a GetDMTF@WBEMTime entry point but the
decorated name of both do not match what the linker is looking for (see the
names below). I looked around msdn to see if there is a new PlatformSDK for
the Windows 64bit but it appears that the includes, libs and dlls all
shipped with VS2005. If anyone can help me (other than to tell me that I
should recode the project in .net managed...which is not possible right
now), I would be forever grateful.

Error 1 error LNK2019: unresolved external symbol "public: wchar_t * __cdecl
WBEMTime::GetDMTF(int)const " (?GetDMTF@WBEMTime@@QEBAPEA_WH@Z) referenced
in function "private: long __cdecl CMyClass::MyMethod(struct IWbemServices
*,struct IWbemClassObject *)"
(?MyMethod@CMyClass@@AEAAJPEAUIWbemServices@@PEAUIWbemClassObject@@@Z)
MyClass.obj


C:\Program Files (x86)\Microsoft Visual Studio
8\VC\PlatformSDK\Lib\FrameDyn.Lib
?GetDMTF@WBEMTime@@QBEPAGH@Z (public: unsigned short * __thiscall
WBEMTime::GetDMTF(int)const )


C:\Program Files (x86)\Microsoft Visual Studio
8\VC\PlatformSDK\Lib\AMD64\FrameDyn.Lib
?GetDMTF@WBEMTime@@QEBAPEAGH@Z (public: unsigned short * __cdecl
WBEMTime::GetDMTF(int)const )

Thanks in advance,
Tony

Re: vs2005 64-bit platformsdk issue by Chris

Chris
Wed Mar 22 23:36:32 CST 2006

It looks like the FrameDyn.lib files are compiled with:
typedef unsigned short wchar_t
whereas yours is compiled with wchar_t being a built-in data type (the
default for VS2005).

VS2005 - Property Pages - Configuration Properties - C/C++ - Language -
Treat wchar_t as Built-in Type = No (default is Yes)


cmk



Re: vs2005 64-bit platformsdk issue by Anthony

Anthony
Thu Mar 23 09:05:45 CST 2006

Hi Chris,
That was the trick!!!
Thank you very much!!!!!!!

"Chris Kushnir" <ckushnir@rogers.com> wrote in message
news:%23KBcs3jTGHA.5808@TK2MSFTNGP12.phx.gbl...
> It looks like the FrameDyn.lib files are compiled with:
> typedef unsigned short wchar_t
> whereas yours is compiled with wchar_t being a built-in data type (the
> default for VS2005).
>
> VS2005 - Property Pages - Configuration Properties - C/C++ - Language -
> Treat wchar_t as Built-in Type = No (default is Yes)
>
>
> cmk
>
>