大概流程参考:同态加密库Seal库的安装(win11+VS2022)_同态解密seal安装-CSDN博客
- cd进入SEAL文件夹,三个命令按顺序敲
-
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 cmake --build build --config Release cmake --install build
这个步骤要在SEAL文件下,成功版截图长这样:
-
在执行第一条的时候这里我遇到了这样的问题:
-
D:\Program Files\SEAL-main>cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -- Build type (CMAKE_BUILD_TYPE): Release -- The CXX compiler identification is MSVC 19.39.33521.0 -- The C compiler identification is MSVC 19.39.33521.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Microsoft SEAL debug mode: OFF -- SEAL_USE_CXX17: ON -- SEAL_BUILD_DEPS: ON -- SEAL_USE_MSGSL: ON -- Microsoft GSL: download ... 适用于 .NET Framework MSBuild 版本 17.9.5+33de0b227 1>Checking Build System 1>Creating directories for 'msgsl-populate' Performing download step (git clone) for 'msgsl-populate' Cloning into 'msgsl-src'... fatal: unable to access 'https://github.com/microsoft/GSL.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 Cloning into 'msgsl-src'... fatal: unable to access 'https://github.com/microsoft/GSL.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 Cloning into 'msgsl-src'... fatal: unable to access 'https://github.com/microsoft/GSL.git/': Failed to connect to github.com port 443 after 21028 ms: Couldn't connect to server -- Had to git clone more than once: 3 times. CMake Error at msgsl-subbuild/msgsl-populate-prefix/tmp/msgsl-populate-gitclone.cmake:39 (message): Failed to clone repository: 'https://github.com/microsoft/GSL.git' D:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: “D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-download.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-update.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-patch.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-configure.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-build.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-install.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7d31416fd56b7bdccf72d0b662be8257\msgsl-populate-test.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\7b52cf593894971921b797ea739f3c2c\msgsl-populate-complete.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeFiles\327cdd59d7424e7a6ab93f43232c6e5d\msgsl-populate.rule;D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\CMakeLists.txt”的自定义生成已退出,代码为 1。 [D:\Program Files\SEAL-main\build\thirdparty\msgsl-subbuild\msgsl-populate.vcxproj] CMake Error at D:/Program Files/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1714 (message): Build step for msgsl failed: 1 Call Stack (most recent call first): D:/Program Files/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1854:EVAL:2 (__FetchContent_directPopulate) D:/Program Files/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1854 (cmake_language) cmake/ExternalMSGSL.cmake:12 (FetchContent_Populate) cmake/SEALMacros.cmake:17 (include) CMakeLists.txt:150 (seal_fetch_thirdparty_content)
- 最后是输入里的附加依赖项这个看自己的这个文件夹里是什么:
-
成功截图