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>

  • 相关阅读:
    java中==和equels的区别
    synchronized的用法及原理
    分库分表之Mycat实现
    Mysql架构和索引及性能优化
    Java内存模型与反向代理服务器Nginx
    Spring基础知识
    使用和理解线程池
    知识补充(数据库优化、三大范式)
    最大子数组问题,分治法求解
    Mybatis学习笔记
  • 原文地址:https://www.cnblogs.com/vc60er/p/2823679.html
Copyright © 2011-2022 走看看