CLion和Yaml-cpp:如何在windows中用clion构建yaml-cpp

时间:2018-04-02 07:32:21

标签: clion yaml-cpp

我已成功在linux中安装yaml-cpp,然后我想在带有clion的windows中安装yaml-cpp。但是当我构建或安装它时,发生了一些错误。如:

 In file included from D:/github/yaml-cpp/test/gtest-1.8.0/googletest/include/gtest/internal/gtest-linked_ptr.h:74:0,
                 from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-port.h:53,
                 from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44,
                 from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/internal/gmock-internal-utils.h:45,
                 from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/gmock-actions.h:46,
                 from D:/github/yaml-cpp/test/gtest-1.8.0/googlemock/include/gmock/gmock.h:58,
                 from D:\github\yaml-cpp\test\gtest-1.8.0\googlemock\src\gmock-all.cc:40:
D:/github/yaml-cpp/test/gtest-1.8.0/googletest/include/gtest/internal/gtest-port.h:1782:3: error: 'AutoHandle' does not name a type

如果我想在Windows中使用yaml-cpp,我应该修改一些内容吗?

2 个答案:

答案 0 :(得分:0)

通过-DYAML_CPP_BUILD_TESTS = OFF在CMake配置期间禁用测试支持。 似乎捆绑了gtest has issues with MinGW compatibility

答案 1 :(得分:0)

intellij-support有solved这个问题。