Re: Unicode and Multi-byte when linking
Nice... I think I'll steal that idea :o)
Tom
"David Connet" <stuff@agilityrecordbook.com> wrote in message
news:izKfl.3094$%54.2917@nlpi070.nbdc.sbc.com...
"Tom Serface" <tom@nospam.camaswood.com> wrote in
news:89592724-26C5-43E3-8A15-87CC315C2098@microsoft.com:
I typically just have a different DLL for each "type" of build and
name it appropriately. For example:
MyDLL_ud.dll - Unicode debug
MyDLL_u.dll - Unicode
MyDLL.dll - ANSI
MyDLL_d.dll - ANSI debug
Then I link the appropriate one in based on the properties in my
project.
Tom
I've often done this:
#ifdef _DEBUG
#define MYDLL_DEBUG "D"
#else
#define MYDLL_DEBUG ""
#endif
#ifdef UNICODE
#define MYDLL_UNICODE "U"
#else
#define MYDLL_UNICODE ""
#endif
#pragma comment(lib, "mydll" MYDLL_UNICODE MYDLL_DEBUG ".lib")
I put that block into the dll header (mydll.h) and life is good!
(Assuming the .lib is in the linker path)
Dave Connet