zoukankan      html  css  js  c++  java
  • 使用 VS 2012 编译 GTest 遇到的编译错误

    下载好gtest-1.6.0,然后解压到一个目录下,比如e:\gtest-1.6.0

    如果大家尝试着用VS2012 去编译GTest (e:\gtest-1.6.0\msvc\gtest.sln),可能会碰到下面的编译错误:

    \gtest\include\gtest\gtest-printers.h(550): error C2977: 'std::tuple' : too many template arguments

    可是,怎么解决呢?

    Q:

    用VS2012打开gtest.sln,会提示升级,不用管,一路YES下去。

    然后打开project的properties -> C\C++ Preprocessor -> Processor Definitions 在下拉列表里面选择<Edit...> 

    在preprocessor definition 的窗口下,添加 _VARIADIC_MAX=10,然后保存。接着重新 build project 即可。

    注意的是,该sln下面有四个project,这四个的属性都需要修改。

  • 相关阅读:
    os模块
    sys模块
    psutil模块
    subprocess模块
    time模块
    argparse模块
    tcp端口扫描(python多线程)
    基于http的软件仓库
    SRE思想
    redis哨兵模式
  • 原文地址:https://www.cnblogs.com/yayagamer/p/2952464.html
Copyright © 2011-2022 走看看