error: ‘std::memset’ has not been declared问题的解放办法
2014-03-22 16:43
861 查看
error: ‘std::memchr’ is not a member of ‘std’ error: ‘std::sprintf’ has not been declared error: ‘std::strcmp’ has not been declared error: ‘std::strlen’ has not been declared error: ‘std::memcpy’ has not been declared error: ‘std::memset’ has not been declared error: ‘std::strerror’ has not been declared
出现上述问题,一般是因为头文件没有包含。GNU的某些版本是可以相互包含的,有些则需要各自包含。故解决办法是在出现错误的文件里包含响应的头文件,如下:
// C++ header for:// std::sprintf, std::strerror#include <cstdio> // Not the C header <stdio.h>// C++ header for:// std::strlen, std::memchr, std::strcmp, std:memcpy, std::memset#include <cstring> // Not the C header <string.h>
相关文章推荐
- Qt编译 error: ‘std::tr1’ has not been declared
- 安装opencv出现:cudalegacy/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState’ has not been declared
- cmath:1157:11: error: '::hypot' has not been declared
- 编译opencv2.4.11时出现错误:error: ‘NppiGraphcutState’ has not been declared
- cudalegacy/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState’ has not been declared
- error: ‘::WSAGetLastError’ has not been declared
- QT,error: '::ioctl' has not been declared,调用ioctl
- ubuntu装opencv error: ‘NppiGraphcutState‘ has not been declared
- python---图片格式转换问题,NotImplementedError: tostring() has been removed.
- has not been declared和does not name a type解决办法
- ::system has not been declared 的问题
- 安装opencv出现:cudalegacy/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState’ has not been declared
- windows平台theano在安装gcc后出现error: '::hypot' has not been declared
- NotImplementedError: tostring() has been removed. Please call tobytes() instead的解决办法
- version `GLIBCXX_3.4.14' not found, 及shared_ptr.h error: '_Lock_policy' has not been declared 问题
- 【COCOS2DX-ANDROID-游戏开发之十九】android编译之ctime:66: error: ‘::clock_t’ has not been declared
- error: 'EOF' was not declared in this scope的解决办法