Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 创建谷歌&x27;在VisualStudio上安装CRC32C_C++_Visual Studio Code_Crc - Fatal编程技术网

C++ 创建谷歌&x27;在VisualStudio上安装CRC32C

C++ 创建谷歌&x27;在VisualStudio上安装CRC32C,c++,visual-studio-code,crc,C++,Visual Studio Code,Crc,正如标题所说。我正试图编译找到的代码。我对CMake了解不多。首先,我按照说明运行了以下命令: git submodule update --init --recursive 我收到以下错误消息:致命:不是git存储库(或任何父目录):.git。之后,我尝试运行以下生成命令: cmake -DCRC32C_BUILD_TESTS=0 -DCRC32C_BUILD_BENCHMARKS=0 .. && make all install 输出如下所示: l install --

正如标题所说。我正试图编译找到的代码。我对CMake了解不多。首先,我按照说明运行了以下命令:

git submodule update --init --recursive
我收到以下错误消息:
致命:不是git存储库(或任何父目录):.git
。之后,我尝试运行以下生成命令:

cmake -DCRC32C_BUILD_TESTS=0 -DCRC32C_BUILD_BENCHMARKS=0 .. && make all install
输出如下所示:

l install
-- Building for: Visual Studio 16 2019
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Test CRC32C_HAVE_NO_DEPRECATED
-- Performing Test CRC32C_HAVE_NO_DEPRECATED - Failed
-- Performing Test CRC32C_HAVE_NO_SIGN_COMPARE
-- Performing Test CRC32C_HAVE_NO_SIGN_COMPARE - Failed
-- Performing Test CRC32C_HAVE_NO_UNUSED_PARAMETER
-- Performing Test CRC32C_HAVE_NO_UNUSED_PARAMETER - Failed
-- Performing Test CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS
-- Performing Test CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS - Failed
-- Performing Test HAVE_BUILTIN_PREFETCH
-- Performing Test HAVE_BUILTIN_PREFETCH - Failed
-- Performing Test HAVE_MM_PREFETCH
-- Performing Test HAVE_MM_PREFETCH - Success
-- Performing Test HAVE_SSE42
-- Performing Test HAVE_SSE42 - Success
-- Performing Test HAVE_ARM64_CRC32C
-- Performing Test HAVE_ARM64_CRC32C - Failed
-- Performing Test HAVE_STRONG_GETAUXVAL
-- Performing Test HAVE_STRONG_GETAUXVAL - Failed
-- Performing Test HAVE_WEAK_GETAUXVAL
-- Performing Test HAVE_WEAK_GETAUXVAL - Failed
CMake Error at CMakeLists.txt:184 (add_subdirectory):
  The source directory

    C:/Source/crc32c-master/third_party/glog

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "C:/Source/crc32c-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Source/crc32c-master/build/CMakeFiles/CMakeError.log".
我查看了错误日志,但没有得到多少帮助。第三方/glog目录为空,因此没有任何
CMakeLists.txt
文件。(第三方下的/benchmark和/googletest子目录也为空。)

有人使用VisualStudio成功地构建了它吗?如果是,怎么做


我认为这并不重要,但我使用的是VS2019社区版16.2.5和CMake 3.15.2。蒂亚。

艾伦·伯特斯给了我正确的答案


我刚刚下载了.zip文件,当时我需要对文件进行
git克隆。在那之后,一切都按预期进行。非常感谢Alan Birtles。

您是克隆了代码还是下载了代码?看起来你下载了它,你需要克隆它以便子模块work@AlanBirtles非常感谢你。是的,我没有克隆代码,因为我对git一无所知,所以我不知道怎么做。我尝试了
githttps://github.com/google/crc32c.git
但得到了
错误:无法生成git-https://github.com/google/crc32c.git: 无效参数
。所以我不知道,我说得太早了。再看看GitHub,我就可以执行
git clone
命令了。然后子模块似乎工作了,所以我再次尝试使用cmakebuild命令。它已经进一步发展,所以我将看看最终结果是什么。再次感谢。@AlanBirtles,这很有效。我得到了一个错误,
“make”不被识别为内部或外部命令、可操作程序或批处理文件。
但它确实创建了.sln解决方案文件,因此我能够在VS中找到它并正确编译。谢谢如果你想要分数,你可以把这个作为答案,我会标记它。