Windows上安装Microsoft SEAL
1. 下载最新的zip
2. Visual Studio 2019(已安装)
3. 打开开发人员命令提示窗口(没有的话需要先安装)
4. 开始安装
按照README里的介绍,我一开始选择了下图的方法。
但报错了。
D:\是软工啊\research\SEAL-main>cmake -S . -B build -G “Visual Studio 16 2019” -A x64
– Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
– The CXX compiler identification is MSVC 19.25.28614.0
– The C compiler identification is MSVC 19.25.28614.0
– Check for working CXX compiler: E:/VS/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
– Check for working CXX compiler: E:/VS/VC/Tools/MSVC/14.25.28610/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 for working C compiler: E:/VS/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
– Check for working C compiler: E:/VS/VC/Tools/MSVC/14.25.28610/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
– Build type (CMAKE_BUILD_TYPE): Release
– Microsoft SEAL debug mode: OFF
– Microsoft GSL: download …
CMake Error: Error: generator : Visual Studio 16 2019
Does not match the generator used previously: Ninja
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
CMake Error at E:/VS/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.16/Modules/FetchContent.cmake:903 (message):
CMake step for msgsl failed: 1
Call Stack (most recent call first):
E:/VS/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
cmake/ExternalMSGSL.cmake:12 (FetchContent_Populate)
cmake/SEALMacros.cmake:17 (include)
CMakeLists.txt:132 (seal_fetch_thirdparty_content)
– Configuring incomplete, errors occurred!
See also “D:/是软工啊/research/SEAL-main/build/CMakeFiles/CMakeOutput.log”.
于是就去问开发人员,他们给了我两个解决方法,我选择了第一种,也就是使用Ninja CMake generator,而不是Visual Studio 16 2019 generator。