Subject: Re: [libssh2] how to Compile libssh2 and exemples under windows ?

Re: [libssh2] how to Compile libssh2 and exemples under windows ?

From: Tom Marynowski <tom.marynowski_at_gmail.com>
Date: Tue, 06 Nov 2007 17:23:27 -0500

I have try two different way:

First I have download libssh2-0.18.0-20071106 because I wasn’t capable
to open project include with version 0.17.
 I create by exporting : libssh2_dll.mak, libssh2_lib.mak and tests.mak.
I have trying export PATH by adding an environment variable like:

OPENSSL_PATH = C:\OpenSSL
ZLIB_PATH = C:\Program Files\GnuWin32\src\zlib\1.2.3\zlib-1.2.3
Openssl_patch point directly on installed directory.
ZLIB_PATH point on installed directory , but on sources in installed directory.
Because in makefiles.win32 in have see.

ifndef ZLIB_PATH
ZLIB_PATH = ../../zlib-1.2.3
Endif

But it doesn’t work.
 1) with Nmake.
I have
directly copy \openssl\include into C:\dev\libssh2-0.18.0-20071106\include\openssl-0.9.8e.
And Namke ask for Zlib and Zconf, so I add
it in \libss2******\inclue

But it give and error. Cannot open include file: 'unistd.h'. But
unistd.d is only for POSIX os ??

---------------------------------------------------------

C:\dev\libssh2-0.18.0-20071106\win32>NMAKE /f "libssh2_dll.mak"
CFG="libssh2_dll

 - Win32 Debug"
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
        cl.exe /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I
"..\win32" /D
 "WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "_MBCS" /D "_LIB"
/Fo".\Debug_dll\\"
/Fd".\Debug_dll\\" /FD /GZ /c ..\src\comp.c
comp.c
c:\dev\libssh2-0.18.0-20071106\include\zconf.h(289) : fatal error C1083:
Cannot
open include file: 'unistd.h': No such file or directory
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
------------------------------------------------------

2) With make (gnu) and makefile.win32
-----------------------------------------------------------------

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\lordglub>cd C:\dev\libssh2-0.18.0-20071106\win32
C:\dev\libssh2-0.18.0-20071106\win32>make -f Makefile.win32
gcc -O2 -DNDEBUG -DWIN32 -DLIBSSH2_WIN32 -fno-strict-aliasing -Wall
-I. -I../i
nclude -I../../openssl-0.9.8e/outinc
-I../../openssl-0.9.8e/outinc/openssl -I../
../zlib-1.2.3 -c ../src/channel.c -o release/channel.o
process_begin: CreateProcess(NULL, gcc -O2 -DNDEBUG -DWIN32
-DLIBSSH2_WIN32 -fno
-strict-aliasing -Wall -I. -I../include -I../../openssl-0.9.8e/outinc
-I../../openssl-0.9.8e/outinc/openssl -I../../zlib-1.2.3 -c
../src/channel.c -o release/channel.o, ...) failed.
make (e=2): Le fichier spÚcifiÚ est introuvable.
make: *** [release/channel.o] Erreur 2
--------------------------------------------------------------

I don’t understand why path have /outinc ? in makefile.win32

INCLUDES += -I$(OPENSSL_PATH)/outinc -I$(OPENSSL_PATH)/outinc/openssl
In openssl in have no directory outinc … I have tried to replace it by
include without success.
And
ifdef LINK_STATIC
LDLIBS += $(OPENSSL_PATH)/out/libcrypto.$(LIBEXT)
$(OPENSSL_PATH)/out/libssl.$(LIBEXT)
else
LDLIBS += $(OPENSSL_PATH)/out/libeay32.$(LIBEXT)
$(OPENSSL_PATH)/out/libssl32.$(LIBEXT)
Endif

 I don’t link in static, but in have not found libssl32 in openssl.
But I known that my export Path are not good.

>>i have not file named libssh2.mak in directory Win32 , in subdirectory
>> or inparent directory
>> i have only,

>Sorry, if you want to have libssh2.mak you must open libssh2.dsp in VC++ 6.0 (for example) and >export libssh2.mak
>But you can compile it with Makefile.win32, and before compiling it,
>You must install zlib, openssl and export ZLIB_PATH, OPENSSL_PATH to the installed directory.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-11-06