A
acc13
I have written a .dll that exports a class MyClass, which has a member
function MyFunction(LPCWSTR szMyString).
If I build (I'm using VC7) with the /showIncludes option, I can see
that LPCWSTR is defined in file ...\platformsdk\include\winnt.h as:
typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
and WCHAR is in turn defined as:
#ifndef _MAC
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
#else
// some Macintosh compilers don't define wchar_t in a convenient
location, or define it as a char
typedef unsigned short WCHAR; // wc, 16-bit UNICODE character
#endif
I have (obviously) not defined _MAC (I even verified that no rogue
include did so by testing "#ifdef _MAC\n#error _MAC defined!\n#endif),
so I expect the .lib file to export the function
long __thiscall MyClass::MyFunction(wchar_t const *)
Instead the output from dumpbin shows that my lib file exports the
function,
long __thiscall MyClass::MyFunction(unsigned short const *)
and my test dll client program builds with a LNK2019 unresolved
external symbol.
What's the deal?
Thanks in advance for any help on the matter...
function MyFunction(LPCWSTR szMyString).
If I build (I'm using VC7) with the /showIncludes option, I can see
that LPCWSTR is defined in file ...\platformsdk\include\winnt.h as:
typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
and WCHAR is in turn defined as:
#ifndef _MAC
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
#else
// some Macintosh compilers don't define wchar_t in a convenient
location, or define it as a char
typedef unsigned short WCHAR; // wc, 16-bit UNICODE character
#endif
I have (obviously) not defined _MAC (I even verified that no rogue
include did so by testing "#ifdef _MAC\n#error _MAC defined!\n#endif),
so I expect the .lib file to export the function
long __thiscall MyClass::MyFunction(wchar_t const *)
Instead the output from dumpbin shows that my lib file exports the
function,
long __thiscall MyClass::MyFunction(unsigned short const *)
and my test dll client program builds with a LNK2019 unresolved
external symbol.
What's the deal?
Thanks in advance for any help on the matter...