"互锁增量":在 Visual C++ 2008 中找不到标识符错误
'InterlockedIncrement': identifier not found error in visual c++ 2008
你好,我已经编译了下面指定的代码
long (*interlocked_increment) (volatile long *);
long InterlockedIncrement(volatile long & value) const {
return interlocked_increment(&value);
}
static long m_interlocked_increment(volatile long * pv) {
#ifdef WIN32
return InterlockedIncrement(pv);
#elif defined(HAS_SYNC_FUNCTIONS)
return __sync_fetch_and_add(pv, 1L);
#else
return ++(*pv);
#endif
}
在g++编译器中可以正常工作。但是,当我在visual c++ 2008中尝试相同时,它显示了以下指定的错误。我怎样才能解决这个问题呢?
错误5错误C3861: 'InterlockedIncrement':标识符未找到
InterlockedIncrement()
函数使用volatile long &
,而您传递给它的是volatile long *
,因此编译器找不到相应的函数签名
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- 找不到成员对象:没有名为get_event()的成员,也处理多态性和向量
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 找不到QtResource文件中的文件
- VC++本机单元测试,找不到调试符号
- RegGetValue在当前用户下找不到名称
- 带有 -stdlib=libc++ 的 clang++ 9.0.1 找不到<optional>
- c++找不到具有相同哈希的无序集合元素
- 找不到以下加速库:boost_fiber
- 找不到 FLTK(缺少:FLTK_INCLUDE_DIR)
- 设置 Visual Studio for MPI: 找不到标识符错误
- "assimp/config.h"找不到,但它在文件夹中
- 链接器找不到在虚拟类 c++ 中访问的静态字段的符号
- C++系统找不到指定的文件错误
- 找不到 Visual Studio 2008 的生成工具(平台工具集 = 'v90')
- Visual Studio 2008在生成路径中找不到标头
- "互锁增量":在 Visual C++ 2008 中找不到标识符错误
- 错误 C3861:"__cpuidex":使用 Visual Studio 2008 构建 OpenCV 2.4.11 时找不到标识符