- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我正在写一些简单的 win32 东西,我正在使用以下 wWinMain
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PWSTR pCmdLine, int nCmdShow)
VS2012 express 代码分析说
C28251 Inconsistent annotation for function: this instance has an error Inconsistent annotation for 'wWinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2201). LeesSpaceShip main.cpp 6
我什至不清楚注释是什么。那么什么是注解,我的代码中哪一部分出错了?
除了这个诊断,代码编译和运行都很好。
最佳答案
wWinMain
在winbase.h中的声明(错误中提到)为:
wWinMain(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nShowCmd
);
您在 main.cpp 中的 wWinMain
实现缺少 SAL annotations并且代码分析会警告您不匹配。
关于c++ - 代码分析说 Inconsistent annotation for 'wWinMain' : this instance has no annotations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13078953/
总结:我正在尝试在 Windows 8 上的 Visual Studio 2012 中编译 NVIDIA SDK 应用程序,但收到错误消息:FXC:错误 X3501:“主”:入口点不是发现。我是 Wi
摘要:我尝试在 Windows 8 上的 Visual Studio 2012 中编译 NVIDIA SDK 应用程序,但收到错误消息:FXC : error X3501: 'main': entry
我正在学习 Windows API,并使用 mingw 作为我的编译器,使用 Code::Blocks 作为我的 IDE。我在使用 wWinMain 函数时遇到了问题。我使用了位于 link text
唯一的区别是 Winmain 使用 char* 作为 lpCmdLine 参数,而 wWinMain 使用 wchar_t*。 在 Windows XP 上,如果应用程序条目是 WinMain,Win
这是我仅有的代码: #include int APIENTRY wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPre
我将一个旧项目从 VC6 升级到 VS2008,现在我得到这个编译错误: error C2731: 'wWinMain' : function cannot be overloaded 在这些代码行:
这个问题在这里已经有了答案: wWinmain, Unicode, and Mingw (3 个答案) 关闭 6 年前。 所以我正在尝试使用 Win32 在 CodeBlocks 中创建一个窗口,到
如果您尝试将构建类型从 Console (/SUBSYSTEM:CONSOLE) 更改为 Windows (/SUBSYSTEM:WINDOWS),您将收到一个错误提示该条目缺少 WinMain 点:
我正在写一些简单的 win32 东西,我正在使用以下 wWinMain int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance
由于我是初学者,这可能是一个非常基础的问题。我正在启动 DirectX 11,在创建我的第一个应用程序时,使用了 wWinMain,在搜索 WinMain 和 wWinMain 之间的区别时,我遇到了
整个错误输出为: LNK2019 unresolved external symbol wWinMain referenced in function "int __cdecl __scrt_comm
我是一名优秀的程序员,十分优秀!