c++11使用
来源:互联网 发布:矿用u型钢支架数据 编辑:程序博客网 时间:2024/06/02 02:15
在gcc中加入-std=c++11.
编译错误1
error: ‘shared_ptr’ is not a member of ‘std’
std::shared_ptr<net_que_handle> q_handle = make_shared<net_que_handle>();
解决:gcc中加入-std=c++11,如cc -g -std=c++11 -o xxx
编译错误2
unable to find string literal operator ‘operator"" __FILE__’
#define PROXY_LOG(format,...) printf("FILE:"__FILE__",line:%05d:"format"/n",__LINE__,##__VA_ARGS__)
错误解决:c++11要求字符串和变量拼接的时候要加空格,改为
#define PROXY_LOG(format,...) printf("FILE:" __FILE__ ",line:%05d:" format "/n",__LINE__,##__VA_ARGS__)即可
编译错误1
error: ‘shared_ptr’ is not a member of ‘std’
std::shared_ptr<net_que_handle> q_handle = make_shared<net_que_handle>();
解决:gcc中加入-std=c++11,如cc -g -std=c++11 -o xxx
编译错误2
unable to find string literal operator ‘operator"" __FILE__’
#define PROXY_LOG(format,...) printf("FILE:"__FILE__",line:%05d:"format"/n",__LINE__,##__VA_ARGS__)
错误解决:c++11要求字符串和变量拼接的时候要加空格,改为
#define PROXY_LOG(format,...) printf("FILE:" __FILE__ ",line:%05d:" format "/n",__LINE__,##__VA_ARGS__)即可
0 0
- C++/C++11中引用的使用
- C++/C++11中<numeric>的使用
- C++/C++11中<iterator>的使用
- C++/C++11中<functional>的使用
- C++/C++11中<algorithm>的使用
- c使用json-c库
- 【C/C++】realloc使用总结
- Objective-c 使用c函数
- c使用json-c库
- C++/C 使用中的语法错误
- <c:if><c:choose>使用
- C/C++_log2000_namespace使用辨析
- c:choose、c:when、c:otherwise 使用
- C/C++:VS2012使用C代码
- C++Builder使用经验谈
- Pro*C的使用
- Pro * C 的使用
- 使用c++
- POJ 2502
- 使用AlertDialog 创建四种常见的对话框
- iOS上架自己遇到的错误
- Android Apk瘦身
- 【2016/11/4学习笔记】利用bootstrap modal功能做可用于锁屏的遮罩
- c++11使用
- 使用C++连接MongoDB集群
- Android应用开发allowBackup敏感信息泄露的一点反思
- 栈的应用1:就近匹配
- 前端实时可视化开发工具
- WebRTC中RTP/RTCP协议实现分析
- CSS-文本
- 【数据结构】链表——客房管理
- UIImageView