gpt4 book ai didi

c++ - google-cloud-cpp CMake 生成失败

转载 作者:太空宇宙 更新时间:2023-11-04 12:44:53 25 4
gpt4 key购买 nike

我正在尝试构建 google-cloud-cpp,但出现错误(见下文)。我曾尝试使用 VC++ 和 g++ 构建它,但在使用这两种方法时我都遇到了同样的错误。我使用 cmake-gui。

  • 构建环境:Visual Studios 2017
    操作系统:Windows 10 专业版 64 位

  • 构建环境:Mingw-w64 8.1.0
    操作系统:Windows 10 专业版 64 位

目标:64 位

错误:

CMake Error at cmake/IncludeGMock.cmake:38 (add_library):
Cannot find source file:

D:/google-cloud-cpp/third_party/googletest/googletest/src/gtest-all.cc

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
cmake/GoogleCloudCppCommon.cmake:48 (include)
google/cloud/CMakeLists.txt:42 (include)


CMake Error at cmake/IncludeGMock.cmake:38 (add_library):
No SOURCES given to target: gmock
Call Stack (most recent call first):
cmake/GoogleCloudCppCommon.cmake:48 (include)
google/cloud/CMakeLists.txt:42 (include)

最佳答案

在 git 克隆之后 https://github.com/GoogleCloudPlatform/google-cloud-cpp.git

进入目录

运行 git submodule update --init

关于c++ - google-cloud-cpp CMake 生成失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52220754/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com