transact.h(226) : error C2059: syntax error : 'constant'
f:\program files\microsoft visual studio\vc98\include\transact.h(226) : error C2059: syntax error : 'constant'
f:\program files\microsoft visual studio\vc98\include\transact.h(271) : error C2143: syntax error : missing ';' before '}'
f:\program files\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}'
f:\program files\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}'
f:\program files\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}'
vc6 + sdk03
头文件搜索的顺序,sdk03的include路径比较vc6的靠前
原因是
vc6的\VC98\Include\transact.h中的这里
typedef
enum XACT_E
{ XACT_E_FIRST = 0x8004d000,
XACT_E_LAST = 0x8004d01e,
XACT_S_FIRST = 0x4d000,
XACT_S_LAST = 0x4d009,
和sdk03的Microsoft SDK\include\WinError.h目录中的这里
#define XACT_E_FIRST 0x8004D000
#define XACT_E_LAST 0x8004D029
#define XACT_S_FIRST 0x0004D000
#define XACT_S_LAST 0x0004D010
有冲突
解决办法:
在stdafx.h中增加如下代码即可
#include <transact.h>
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步