ODBCSS.h中的wchar重定义 [英] wchar redefinition in ODBCSS.h
问题描述
转换为Visual Studio 2005时出现以下错误.ODBCSS.h的包含会导致此问题.
I get the following errors when i convert to Visual Studio 2005. Inclusion of ODBCSS.h causes the problem.
-启动错误消息
1> C:\ Program Files \ Microsoft Visual Studio 8 \ VC \ PlatformSDK \ include \ ODBCSS.h(430):错误C2371:'WCHAR':重新定义;不同的基本类型
1> C:\ Program Files \ Microsoft Visual Studio 8 \ VC \ PlatformSDK \ include \ winnt.h(266):请参见"WCHAR"的声明
-结束错误消息
您能告诉我什么地方出问题了吗?感谢您的帮助.
关于
Venkat
推荐答案
请确保在此包含之前包括了windows.h或afxwin.h(如果是MFC应用程序).理想的顺序是.
Make sure windows.h or afxwin.h( if its MFC app) is included before this include. Ideal sequence would be.
#include < afxcmn.h> //如果是MFC
#include <afxcmn.h> //if MFC
#include < sql.h>
#include <sql.h>
#include < odbcss.h>
#include <odbcss.h>
或
or
#include < windows.h>
#include <windows.h>
#include < ; sql.h>
#include <sql.h>
#include < odbcss.h>
#include <odbcss.h>
这篇关于ODBCSS.h中的wchar重定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!