error C2371: 'WCHAR' : redefinition; different basic types
- From: Alex Y Wang <redflyingpig@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 07:48:49 -0700
Hi all, I've been haunted by this problem for quite a while. I've done
a lot of search on the internet but haven't found any solution to
this. I'm building an MFC program with ODBC support and got the
following error:
c:\program files\microsoft visual studio 8\vc\platformsdk\include
\odbcss.h(430) : error C2371: 'WCHAR' : redefinition; different basic
types
c:\program files\microsoft visual studio 8\vc\platformsdk
\include\winnt.h(266) : see declaration of 'WCHAR'
In odbcss.h I found
#ifdef UNICODE
....
#else
typedef char DBCHAR;
#endif
In ocdb.h I found
#if !defined(OLE2ANSI)
#define LPDBSTR LPWSTR
#define DBCHAR WCHAR
....
And in winnt.h I found
#ifndef _MAC
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
....
Which seems to be a bug to me. I've seen this issue being raised many
times during my search but none of them is fully answered. Is there a
suggested solution to this at all?
.
- Follow-Ups:
- Re: error C2371: 'WCHAR' : redefinition; different basic types
- From: Doug Harrison [MVP]
- Re: error C2371: 'WCHAR' : redefinition; different basic types
- From: Joseph M . Newcomer
- Re: error C2371: 'WCHAR' : redefinition; different basic types
- Prev by Date: Re: CAsyncSocket connect() returns 0
- Next by Date: Re: CAsyncSocket connect() returns 0
- Previous by thread: OT? C# integration into MFC C++
- Next by thread: Re: error C2371: 'WCHAR' : redefinition; different basic types
- Index(es):
Relevant Pages
|