Compiling libssh2 on windows

后端 未结 1 484
走了就别回头了
走了就别回头了 2020-12-28 10:21

Some one can help me to compile libssh2 on windows with Visual Studio 2017. The only things I found are too old and outdated.

I downloaded libssh2 from github and ru

相关标签:
1条回答
  • 2020-12-28 11:16

    I could compile libssh2 in a Windows 10 environment (I was intrigued).

    Environment:

    • Windows 10 x64.
    • Visual Studio Community 2017 version 15.2 (26430.4) Release.
    • CMake version 3.9.0-rc5 ( I had to uninstall a previous version manually before install the last version because the installer has changed, as the cmake web suggests).
    • Git version 2.10.1.windows.1

    If you request any other crypto backend libraries than WinCNG , I am afraid you need to compile previously that crypto backend library before any attempt to compile libssh2 and make sure CMake find automatically the crypto-backend-library (if not, check for requested cmake variables and fulfill manually).

    Steps in cmd to compile libssh2 using WinCNG and dynamic library option:

    cd where/you/like/to/install
    git clone https://github.com/libssh2/libssh2.git
    cd libssh2
    mkdir dll <-- directory to install libssh2
    cmake -DCRYPTO_BACKEND=WinCNG -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=./dll --build .
    cmake --build . --target install
    

    And et voilà, after less than a minute, libssh is created and installed in dll directory.

    I hope that this miniguide could help you.

    0 讨论(0)
提交回复
热议问题