Subject: Re: Problem in compiling libssh2

Re: Problem in compiling libssh2

From: Moti Avrahami <moti.dp_at_gmail.com>
Date: Wed, 18 May 2016 14:03:51 +0300

Hi Alexander,

I tried to use CMake, as you offered, in order to generate a VS2003 project
file, but encountered some errors.
I used the CMake GUI with the source code folder: "C:\...\libss2-1.7.0\src"
and I got these errors in the output window:
-------------

CMake Error at CMakeLists.txt:38 (include):
  include could not find load file:

    CheckFunctionExistsMayNeedLibrary

CMake Error at CMakeLists.txt:42 (include):
  include could not find load file:

    CheckNonblockingSocketSupport

CMake Error at CMakeLists.txt:43 (include):
  include could not find load file:

    SocketLibraries

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
(message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES) (found
  version "0.9.8j")
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
(_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindOpenSSL.cmake:303
(find_package_handle_standard_args)
  CMakeLists.txt:63 (find_package)

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file. The version specified may be
lower
  if you wish to support older CMake versions for this project. For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/Workspace/V5.5/libssh2-1.7.0/cmake/CMakeFiles/CMakeOutput.log".
See also "C:/Workspace/V5.5/libssh2-1.7.0/cmake/CMakeFiles/CMakeError.log".

==================================
==================================

In addition, I looked at the CMakeError.log file and see other error:

Determining if files windows.h;bcrypt.h exist failed with the following
output:
Change Dir: C:/Workspace/V5.5/libssh2-1.7.0/cmake/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~2\MICROS~3.NET\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3826333946

Microsoft (R) Development Environment Version 7.10.3077.

Copyright (C) Microsoft Corp 1984-2001. All rights reserved.

------ Build started: Project: cmTryCompileExec3826333946, Configuration:
Debug Win32 ------

Compiling...

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86

Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\"" /D
"_MBCS" /FD /RTCs /MDd /GS /Fo"cmTryCompileExec3826333946.dir\Debug\\"
/Fd"cmTryCompileExec3826333946.dir\Debug/vc70.pdb" /W3 /c /Zi /TC

   ".\CheckIncludeFiles.c"

CheckIncludeFiles.c

CheckIncludeFiles.c(3) : fatal error C1083: Cannot open include file:
'bcrypt.h': No such file or directory

Build log was saved at
"file://c:\Workspace\V5.5\libssh2-1.7.0\cmake\CMakeFiles\CMakeTmp\cmTryCompileExec3826333946.dir\Debug\BuildLog.htm"

cmTryCompileExec3826333946 - 1 error(s), 0 warning(s)

---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 0 skipped

==================================
==================================

For some reason, it looked for wincng library while I use OpenSSL.
What do I miss? which options should I add?

Thanks,
Moti

On Sun, May 15, 2016 at 8:59 PM, Alexander Lamaison <swish_at_lammy.co.uk>
wrote:

> On Sun, 15 May 2016 16:42 Moti Avrahami, <moti.dp_at_gmail.com> wrote:
>
>> Hi,
>>
>> I just downloaded libssh2 v1.7.0 and try to compile it, but encountered a
>> build errors.
>> I tried to compile it with Visual Studio 2003 and also 2013 (just created
>> an empty C++ Static Library project and put inside all the source and
>> header files) but failed because of the following error:
>> *C2037 left of 'abstract' specifies undefined struct/union
>> '_LIBSSH2_SESSION'*
>>
>
> Hi Moti,
>
> Please use CMake to generate the Visual Studio 2013 project.
>
> Thanks,
> Alex
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-05-18