Subject: RE: 64 Bit compilation of libssh2 on AMD 64

RE: 64 Bit compilation of libssh2 on AMD 64

From: Neil Gierman <ngierman_at_roadrunn.com>
Date: Wed, 24 Jun 2009 12:59:36 -0500

> I am using MsDev studio only. I tried compiling libssh2 using x64 Visual
studio but it keeps looking for libssl and libcrypt which are not there in
my open SSL installation. Any ideas ?

Below are my Pre-Build Event commands to compile OpenSSL and place it in the
directory where my Solution Linker can find:

----------- Snip ----------------------------
cd ..\..\open\openssl-0.9.8g
perl Configure VC-WIN32
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
del /s/q/f tmp32
del /s/q/f out32
del /s/q/f inc32
nmake -f ms\nt.mak tmp32
nmake -f ms\nt.mak out32
nmake -f ms\nt.mak inc32
nmake -f ms\nt.mak inc32\openssl
nmake -f ms\nt.mak banner
nmake -f ms\nt.mak headers
nmake -f ms\nt.mak lib
copy /Y inc32\openssl\*.* include\openssl\
copy out32\libeay32.lib "$(OutDir)\libcrypto.lib"
copy out32\ssleay32.lib "$(OutDir)\libssl.lib"
----------- Snip ----------------------------

For Win64 those Pre-Build commands are:

----------------------Snip-------------------------
cd ..\..\open\openssl-0.9.8g
perl Configure VC-WIN64A
perl util\mkfiles.pl >MINFO
perl ms\uplink.pl win64a > ms\uptable.asm
ml64 -c -Foms\uptable.obj ms\uptable.asm
perl util\mk1mf.pl no-asm VC-WIN64A >ms\nt.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
del /s/q/f tmp32
del /s/q/f out32
del /s/q/f inc32
nmake -f ms\nt.mak tmp32
nmake -f ms\nt.mak out32
nmake -f ms\nt.mak inc32
nmake -f ms\nt.mak inc32\openssl
nmake -f ms\nt.mak banner
nmake -f ms\nt.mak headers
nmake -f ms\nt.mak lib
copy /Y inc32\openssl\*.* include\openssl\
copy out32\libeay32.lib "$(OutDir)\libcrypto.lib"
copy out32\ssleay32.lib "$(OutDir)\libssl.lib"
---------------------Snip-------------------------

I am compiling both OpenSSL and libssh2 statically (.LIB) and not
dynamically (.DLL) because I wanted a self-contained application. That is
why I have more than just "Configure && nmake". If you want dynamic
libraries you will need to make the appropriate adjustments to the Pre-Build
commands. Also, Debug builds require different build commands, but you can
use Release OpenSSL libs on a debug build application if you don't want/need
to debug inside the OpenSSL libraries.

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