喜受写代码的小强 2014-12-28 14:59 采纳率: 0%
浏览 1436

新手刚加入C++,拿着源码环境报错,求求大家

报了一堆错误 winternl.h 这是包含文件啊系统的,怎么可能会报错啊,求求大家,这是什么错误,我装的VC6.0编译的

--------------------Configuration: Shell - Win32 Debug--------------------
Compiling...
BrowserWnd.cpp
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(75) : error C2011: '_FILETIME' : 'struct' type redefinition
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2065: 'POWER_ACTION' : undeclared identifier
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2065: 'SYSTEM_POWER_STATE' : undeclared identifier
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2275: 'ULONG' : illegal use of this type as an expression
c:\program files (x86)\microsoft visual studio\vc98\include\windef.h(43) : see declaration of 'ULONG'
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2275: 'BOOLEAN' : illegal use of this type as an expression
c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(636) : see declaration of 'BOOLEAN'
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2078: too many initializers
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1786) : error C2275: 'BOOLEAN' : illegal use of this type as an expression
c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(636) : see declaration of 'BOOLEAN'
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1812) : error C2065: 'POWER_INFORMATION_LEVEL' : undeclared identifier
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1812) : error C2275: 'PVOID' : illegal use of this type as an expression
c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(106) : see declaration of 'PVOID'
c:\program files (x86)\microsoft visual studio\vc98\include\winternl.h(1812) : error C2275: 'ULONG' : illegal use of this type as an expression
c:\program files (x86)\microsoft visual studio\vc98\include\windef.h(43) : see declaration of 'ULONG'

  • 写回答

1条回答 默认 最新

  • ChatGPTᴼᴾᴱᴺᴬᴵ 2023-04-13 12:45
    关注

    该回答引用ChatGPT-3.5

    您好!从您提供的编译错误来看,似乎是在包含winternl.h头文件时遇到了一些问题,其中涉及到了一些未声明的标识符和类型重定义等问题。


    可能的原因有以下几种:

    1. 版本问题:您正在使用的VC6.0编译器已经相当古老了,而winternl.h文件是Windows操作系统提供的系统级头文件。您可以考虑升级到较新的编译器,比如Visual Studio 2019,并检查系统是否具有支持的版本。
    1. 文件重复包含:您的源文件中可能已经包含了winternl.h头文件,而在编译时又将该头文件包含进来,导致类型重定义等错误。您可以在源文件中检查是否重复包含了该头文件,并保留必要的头文件。
    1. 系统环境问题:由于winternl.h头文件是Windows操作系统提供的系统级头文件,因此在某些情况下,可能需要特定的环境或库文件支持。您可以检查系统环境和库文件是否正确配置,并尝试重新编译程序。

    希望以上建议能对您解决问题有所帮助!

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记