代码之家  ›  专栏  ›  技术社区  ›  AndreKR

在Qt Creator中打开GitAhead时“找不到OpenSSL”

  •  0
  • AndreKR  · 技术社区  · 7 年前

    GitAhead 在“针对VS2017的x64本机工具命令提示符”中,只需按照 README

    • 让我做和 ninja.exe 在路上
    • 查看项目和子模块
    • 在VS命令提示符中,更改为 gitahead\build\release 目录并运行 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:\dev-tools\Qt\5.12.0\msvc2017_64 ../..

    它构建完成,我得到一个gitaward.exe。

    现在我想知道是否可以在Qt Creator中打开该项目。根据 this CMakeLists.txt

    起初,这根本不起作用。通过反复试验,我提出了以下必须在选项中设置的环境变量>工具包>环境:

    CC=cl
    CXX=cl
    LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64;C:\dev-tools\VisualStudioBuildTools\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64
    PATH=${PATH};C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\dev-tools\VisualStudioBuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
    

    但现在我被卡住了。现在,当我单击“配置项目”时,我得到:

    Running "C:\dev-tools\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{7a503b92-9fbb-4075-960e-6a968505fe74}" --experimental" in C:\Users\andre\AppData\Local\Temp\QtCreator-lyJxiX\qtc-cmake-OgvZcaJK.
    Starting to parse CMake project, using: "-DCMAKE_CXX_COMPILER:STRING=", "-DCMAKE_C_COMPILER:STRING=", "-DCMAKE_PREFIX_PATH:STRING=C:/dev-tools/Qt/5.12.0/msvc2017_64", "-DQT_QMAKE_EXECUTABLE:STRING=C:/dev-tools/Qt/5.12.0/msvc2017_64/bin/qmake.exe".
    The C compiler identification is MSVC 19.16.27026.1
    The CXX compiler identification is MSVC 19.16.27026.1
    Check for working C compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
    Check for working C compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/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:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
    Check for working CXX compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/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
    Found Git: C:/dev-tools/Git/cmd/git.exe (found version "2.20.1.windows.1") 
    CMake Warning (dev) at dep/libssh2/libssh2/CMakeLists.txt:52 (option):
      Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
      --help-policy CMP0077" for policy details.  Use the cmake_policy command to
      set the policy and suppress this warning.
    
      For compatibility with older versions of CMake, option is clearing the
      normal variable 'BUILD_SHARED_LIBS'.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "1.1.1a")
    Could NOT find Libgcrypt (missing: LIBGCRYPT_LIBRARY LIBGCRYPT_INCLUDE_DIR) 
    Looking for include files windows.h, bcrypt.h
    Looking for include files windows.h, bcrypt.h - not found
    CMake Error at dep/libssh2/libssh2/src/CMakeLists.txt:170 (message):
      No suitable cryptography backend found.
    
    
    Configuring incomplete, errors occurred!
    See also "C:/Users/andre/AppData/Local/Temp/QtCreator-lyJxiX/qtc-cmake-OgvZcaJK/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/andre/AppData/Local/Temp/QtCreator-lyJxiX/qtc-cmake-OgvZcaJK/CMakeFiles/CMakeError.log".
    CMake Project parsing failed.
    

    OPENSSL_ROOT_DIR=C:\dev-projects\gitahead\dep\openssl\openssl
    

    对于环境变量,这没有什么区别。我不知道为什么CMake可以在命令行(在VS命令提示符下)上找到OpenSSL,但不能在QtCreator中找到。我如何调试这个?

    0 回复  |  直到 7 年前