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>

转载于:https://www.cnblogs.com/vc60er/archive/2012/12/18/2823679.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值