Visual Studio2012 编译 gtest 遇到 error C2977: ‘std::tuple‘ : too many template argum...
问题描述:
今天想试用visual stuido11做个小程序,打算做成TDD的样子,编译gtest的时候报如下的错:
test\gtest.h(9735): error C2977: ‘std::tuple’ : too many template arguments
c:\program files (x86)\microsoft visual studio 11.0\vc\include\utility(72) : see declaration of ‘std::tuple’
…
因为VS11在 xstddef.h中 把宏 _VARIADIC_MAX默认定义改成了5,而gtest中的头文件将其定义为10,不一致导致重定义,并引发了一系列错误与警告。
解决方案:
打开 c:\program files (x86)\Microsoft Visual Studio 11.0\VC\include\xstddef,把 _VARIADIC_MAX定义成10
Visual Studio2012 编译 gtest 遇到 error C2977: ‘std::tuple‘ : too many template argum...相关推荐
- test\fmw\gtest\include\gtest/gtest-printers.h(714) : error C2977: “std::tuple”: 模板 参数太多
具体错误 D:\Office-3.5-project\jdk11u\test\fmw\gtest\include\gtest/gtest-printers.h(714) : error C2977: ...
- error C2977: “std::tuple”: 模板参数太多 的解决办法
1>D:\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(5059): error C2977: ...
- Visual Stdio2013 编译错误【error C4996:'scanf':This function or variable may be unsafe.】最简单的解决方法
(请先看置顶博文)https://blog.csdn.net/GenuineMonster/article/details/104495419 在Visual Studio 2013中编译 C 语言项 ...
- Visual C++编译错误:error C2220: 警告被视为错误 - 没有生成“object”文件
产生这种错误的原因是:原因是该文件使用的编码格式与当前系统对应的代码页格式不一样,例如原文件的代码页为unicode或utf-8,而我们系统中的代码页为中文gb2312-936. 解决方案:(查看当前 ...
- C++11 std::tuple
一 简介 头文件 <tuple> template< class... Types > class tuple; (C++11) 二 取值及辅助函数 #include < ...
- caffe中在某一层获得迭代次数的方法以及caffe编译时报错 error: ‘to_string‘ is not a member of ‘std‘解决方法
caffe中在某一层获得迭代次数的方法以及caffe编译时报错 error: 'to_string' is not a member of 'std'解决方法 参考文章: (1)caffe中在某一层获 ...
- Qt编译报错:usr/include/c++/4.9/bits/stl_relops.:67: Parse error at “std“的解决办法
明明安装了gcc和g++,版本是4.9.2 系统debian8 qmake -v qmake myproject.pro 无任何报错 make 编译没有问题,链接的时候报错: /usr/local/ ...
- 关于VS2012使用make_pair编译提示“error C2664: “std::make_pair”: 不能将参数 1 从“int”转换为“int ””
参照微软官方回复: #include <iostream> #include <ostream> #include <string> #include < ...
- visual studio编译错误集(转)
1.error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 在项目属性-&g ...
最新文章
- 如何建立顺畅的项目流程
- 高动态范围图像-单图
- [ACM训练] ACM中巧用文件的输入输出来改写acm程序的输入输出 + ACM中八大输入输出格式...
- Java基础——Java多线程中sleep()、wait()和notify()
- SQL 存储过程中,将串连的字符串当表用。
- matlab中quiver,matlab quiver 比例尺
- 数据库查询-模糊查询
- 回复git@vger.kernel.org的注意事项
- Python字符串拼接的四种方法
- 让人感到心灵平静,阳光温暖的图片
- 04 | 穿越功耗墙,我们该从哪些方面提升“性能”?
- Android studio 多渠道打包(包括不同的包使用不同的资源文件、不同的包写不同的代码,包名等等)
- sgu482 Impudent Thief (动态规划)
- python银行账户资金交易管理办法_Python实现银行账户资金交易管理系统
- 康耐视3D-DS1000相机图像采集流程
- 股指期货网址(股指 期货)
- 美团图神经网络训练框架的实践和探索
- windows 控制linux,windows远程控制linux的最佳方案
- 初尝Windows8预览版
- 酷睿i5 12600HX怎么样 相当于什么水平