gpt4 book ai didi

c++ - wdk ddk 编译器问题与 OutputDebugString

转载 作者:行者123 更新时间:2023-11-30 04:07:27 28 4
gpt4 key购买 nike

我正在尝试使用 WDK 构建环境构建 C++ 文件,并尝试在 DebugView 工具中查看输出。所以,当我尝试 windows 方法 OutputDebugString(L"Inside the method");在我们的程序中,当我编译 c++ 文件时,出现以下错误。

error C3861: 'OutputDebugString': identifier not found

在我包含头文件“Windows.h”之后,我得到了以下错误:

错误 C2182:“WakeAllConditionVariable”:非法使用类型“void” 错误 C2491:“WakeAllConditionVariable”:不允许定义 dllimport 数据 错误 C2440:“正在初始化”:无法从“int *”转换为“int” error C2059: 语法错误: ')' 错误 C2146:语法错误:在标识符“ConditionVariable”之前缺少“)”错误 C2491:“SleepConditionVariableCS”:不允许定义 dllimport 数据

大约 243 错误。

请给我建议解决方案。谢谢,

最佳答案

如果您包含 WDK 包含文件“winbase.h”而不是“windows.h”,它应该可以解决您的问题。

关于c++ - wdk ddk 编译器问题与 OutputDebugString,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22498693/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com