问题描述:

今天想试用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...相关推荐

  1. 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: ...

  2. error C2977: “std::tuple”: 模板参数太多 的解决办法

    1>D:\trunk\testing\gtest\include\gtest/internal/gtest-param-util-generated.h(5059): error C2977: ...

  3. Visual Stdio2013 编译错误【error C4996:'scanf':This function or variable may be unsafe.】最简单的解决方法

    (请先看置顶博文)https://blog.csdn.net/GenuineMonster/article/details/104495419 在Visual Studio 2013中编译 C 语言项 ...

  4. Visual C++编译错误:error C2220: 警告被视为错误 - 没有生成“object”文件

    产生这种错误的原因是:原因是该文件使用的编码格式与当前系统对应的代码页格式不一样,例如原文件的代码页为unicode或utf-8,而我们系统中的代码页为中文gb2312-936. 解决方案:(查看当前 ...

  5. C++11 std::tuple

    一 简介 头文件 <tuple> template< class... Types > class tuple; (C++11) 二 取值及辅助函数 #include < ...

  6. caffe中在某一层获得迭代次数的方法以及caffe编译时报错 error: ‘to_string‘ is not a member of ‘std‘解决方法

    caffe中在某一层获得迭代次数的方法以及caffe编译时报错 error: 'to_string' is not a member of 'std'解决方法 参考文章: (1)caffe中在某一层获 ...

  7. 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/ ...

  8. 关于VS2012使用make_pair编译提示“error C2664: “std::make_pair”: 不能将参数 1 从“int”转换为“int ””

     参照微软官方回复: #include <iostream> #include <ostream> #include <string> #include < ...

  9. visual studio编译错误集(转)

    1.error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 在项目属性-&g ...

最新文章

  1. 如何建立顺畅的项目流程
  2. 高动态范围图像-单图
  3. [ACM训练] ACM中巧用文件的输入输出来改写acm程序的输入输出 + ACM中八大输入输出格式...
  4. Java基础——Java多线程中sleep()、wait()和notify()
  5. SQL 存储过程中,将串连的字符串当表用。
  6. matlab中quiver,matlab quiver 比例尺
  7. 数据库查询-模糊查询
  8. 回复git@vger.kernel.org的注意事项
  9. Python字符串拼接的四种方法
  10. 让人感到心灵平静,阳光温暖的图片
  11. 04 | 穿越功耗墙,我们该从哪些方面提升“性能”?
  12. Android studio 多渠道打包(包括不同的包使用不同的资源文件、不同的包写不同的代码,包名等等)
  13. sgu482 Impudent Thief (动态规划)
  14. python银行账户资金交易管理办法_Python实现银行账户资金交易管理系统
  15. 康耐视3D-DS1000相机图像采集流程
  16. 股指期货网址(股指 期货)
  17. 美团图神经网络训练框架的实践和探索
  18. windows 控制linux,windows远程控制linux的最佳方案
  19. 初尝Windows8预览版
  20. 酷睿i5 12600HX怎么样 相当于什么水平

热门文章

  1. git的一些基本命令总结
  2. APP推广案例之星巴克APP营销方式
  3. 设置页眉页脚--分节符
  4. 数字孪生定义、意义及案例
  5. 计算机低级格式化,低级格式化,教您硬盘怎么低级格式化
  6. java calendar计算时间差_Java Calendar 计算时间差
  7. 错误隐藏学习手记(六)
  8. 5G基站: 请叫哥牛逼!
  9. 由SoC到SOPC、SoC FPGA ,异同优缺点的介绍及常见应用场景
  10. c语言字母杨辉三角,用C语言编写杨辉三角(示例代码)