zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    开淘店记录
    广告轮播效果
    loading事件加载效果
    正则表达式摘要
    cookie存取数据分析
    js 空格与回车处理
    数据对象型转换为数组型
    变换闪烁效果
    eclipse配置新环境
    五小时轻松入门Python
  • 原文地址:https://www.cnblogs.com/vc60er/p/2823679.html
Copyright © 2011-2022 走看看