error C3861: “InitializeCriticalSectionAndSpinCount”: 找不到标识符
2015-05-06 11:02
886 查看
VS2003的工程转换成VS2010后编译报错
error C3861: “InitializeCriticalSectionAndSpinCount”: 找不到标识符
定位到atlcore.h文件,这是系统文件没有做任何更改,不该有错的呀。主要还是版本兼容性问题。
修改方法:
新建一个targetver.h头文件,复制以下代码:
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>
然后在工程的stdafx.h的顶部添加 include"targetver.h"。
重新编译即可。
error C3861: “InitializeCriticalSectionAndSpinCount”: 找不到标识符
定位到atlcore.h文件,这是系统文件没有做任何更改,不该有错的呀。主要还是版本兼容性问题。
修改方法:
新建一个targetver.h头文件,复制以下代码:
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>
然后在工程的stdafx.h的顶部添加 include"targetver.h"。
重新编译即可。
相关文章推荐
- InitializeCriticalSectionAndSpinCount : 找不到标识符
- error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found
- InitializeCriticalSectionAndSpinCount
- InitializeCriticalSectionAndSpinCount
- InitializeCriticalSectionAndSpinCount以及InitializeCriticalSection的区别
- InitializeCriticalSectionAndSpinCount
- C++的长api InitializeCriticalSectionAndSpinCount
- 转:InitializeCriticalSectionAndSpinCount()
- InitializeCriticalSectionAndSpinCount identifier not found
- InitializeCriticalSectionAndSpinCount
- InitializeCriticalSectionAndSpinCount
- Window API -- InitializeCriticalSectionAndSpinCount()
- InitializeCriticalSectionAndSpinCount 错误
- InitializeCriticalSectionAndSpinCount
- InitializeCriticalSectionAndSpinCount()
- Init CriticalSection spin count异常
- Init CriticalSection spin count异常
- 编译错误之error C3861: “xxxx”: 找不到标识符
- error c3861 :"_T":找不到标识符
- error C3861: 'TryEnterCriticalSection': identifier not found