CLion 和 Yaml-cpp:如何在 windows 中使用 clion 构建 yaml-cpp
CLion and Yaml-cpp: how can i build yaml-cpp with clion in windows
我已经在 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
,我需要修改什么吗?
只需通过 -DYAML_CPP_BUILD_TESTS=OFF 在 CMake 配置期间禁用测试支持。
似乎捆绑了 gtest has issues with MinGW compatibility.
intellij-support 有 solved 这个问题。
我已经在 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
,我需要修改什么吗?
只需通过 -DYAML_CPP_BUILD_TESTS=OFF 在 CMake 配置期间禁用测试支持。 似乎捆绑了 gtest has issues with MinGW compatibility.
intellij-support 有 solved 这个问题。