我在源程序中#define _WIN32_WINNT >= 0x0500 后
出现错误:
c:\program files\microsoft visual studio\vc98\include\winbase.h(101) : fatal error C1017: invalid integer constant expression
Error executing cl.exe.
怎么解决?谢谢。
winbase.h出错地方是这里
#if (_WIN32_WINNT >= 0x0500)
#if defined(_M_ALPHA)
#define MoveMemoryVlm RtlMoveMemory
#define CopyMemoryVlm RtlCopyMemory
#define FillMemoryVlm RtlFillMemory
#define ZeroMemoryVlm RtlZeroMemory
#endif
#endif
谢谢!

解决方案 »

  1.   

    #define _WIN32_WINNT >= 0x0500 ?能这么写吗?
    _WIN32_WINNT 是个宏,你可以把它定义为一个值,但不能用>=号吧?
    如你可以写成#define _WIN32_WINNT 0x0500
      

  2.   

    改成#define _WIN32_WINNT 0x0500
    出现很多错误:
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2065: 'PMIB_ICMP_EX' : undeclared identifier
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2146: syntax error : missing ')' before identifier 'pStats'
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : warning C4229: anachronism used : modifiers on data are ignored
    c:\program files\microsoft sdk\include\iphlpapi.h(185) : error C2059: syntax error : ')'
    ....
    ....
      

  3.   

    这就是说这里的问题已经解决了
    你看看iphlpapi.h那里有什么问题呀
      

  4.   

    iphlpapi.h是微软作的呀,我不知怎么改,而且显示没有定义的有很多呀。
    我用了sd
      

  5.   

    #define _WIN32_WINNT  0x0510 
    并确认你是在WIN2000/XP上用VC6。
      

  6.   

    问题依旧
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2065: 'PMIB_ICMP_EX' : undeclared identifier
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2146: syntax error : missing ')' before identifier 'pStats'
    c:\program files\microsoft sdk\include\iphlpapi.h(183) : warning C4229: anachronism used : modifiers on data are ignored
    c:\program files\microsoft sdk\include\iphlpapi.h(185) : error C2059: syntax error : ')'
    ....
    ....
      

  7.   

    #define _WIN32_WINNT  0x0510 
    放在所有#include指令的最前面。