VS2022 Seal库的安装

大概流程参考:同态加密库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)

    参考的是:windows下Cmake配置vs2022工程_vs2022 cmake-CSDN博客

  • 最后是输入里的附加依赖项这个看自己的这个文件夹里是什么:
  • 成功截图

  • 28
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值