文档里说该函数是定义在winbase.h里的,只要包含windows.h就可以了的啊。 这是msdn里的说明 Client Requires Windows XP or Windows 2000 Professional. Server Requires Windows Server 2003 or Windows 2000 Server. Header Declared in Winbase.h; include Windows.h. Library Link to Kernel32.lib. DLL Requires Kernel32.dll.
好像加了"#define _WIN32_WINNT 0x0500 "后还是不行啊
同意:wangk(倒之) 加上#define _WIN32_WINNT 0x0500如果仍然不行,建议安装最新的Platform SDK:Microsoft® Visual C++® includes content from the edition of the Platform SDK that was current at the time Visual C++ was released. Therefore, if you install the latest Platform SDK, you may end up with multiple versions of the same header files on your computer. To ensure that you are using the latest version of the SDK header files, follow the directions included in Installing the Platform SDK with Visual Studio. Otherwise, you will receive the following error when compiling code that uses features that were introduced after Visual C++ was released: error C2065: undeclared identifier.
在
第一个#include 前加上预编译指令:
#define _WIN32_WINNT 0x0500
然后重新Rebuild All即可。
这是msdn里的说明
Client Requires Windows XP or Windows 2000 Professional.
Server Requires Windows Server 2003 or Windows 2000 Server.
Header Declared in Winbase.h; include Windows.h.
Library Link to Kernel32.lib.
DLL Requires Kernel32.dll.
加上#define _WIN32_WINNT 0x0500如果仍然不行,建议安装最新的Platform SDK:Microsoft® Visual C++® includes content from the edition of the Platform SDK that was current at the time Visual C++ was released. Therefore, if you install the latest Platform SDK, you may end up with multiple versions of the same header files on your computer. To ensure that you are using the latest version of the SDK header files, follow the directions included in Installing the Platform SDK with Visual Studio. Otherwise, you will receive the following error when compiling code that uses features that were introduced after Visual C++ was released: error C2065: undeclared identifier.
Linking...
TimerMsgBox2.obj : error LNK2001: unresolved external symbol __imp__DeleteTimerQueueTimer@12
TimerMsgBox2.obj : error LNK2001: unresolved external symbol __imp__CreateTimerQueueTimer@28
Debug/TimerMsgBox2.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.还望各位救人救到底!
好,发分