VS2010 + winxp 无法定位程序输入点GetTickCount64 在动态链接库kernel32.dll上 错误

时间:2022-11-05 15:21:16

winxp系统,使用VS2010,

在使用boost中的thread中的sleep的时候出现

“无法定位程序输入点GetTickCount64 在动态链接库kernel32.dll上”的错误,

在网上搜索了解决方案,例如:(http://zhidao.baidu.com/question/525243508.html)都无法解决。在参考http://software.intel.com/en-us/forums/topic/345090后得到解决方法:

1.在“stdafx.h”中#include <SDKDDKVer.h>之前定义:#define _WIN32_WINNT 0x0501

2.重新生成解决方案

至此可以正确使用boost::thread::sleep()或者boost::this_thread::sleep()