cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP problems

From: Ray Satiro <raysatiro_at_yahoo.com>
Date: Mon, 27 Oct 2014 05:15:20 -0400

On 10/24/2014 3:59 PM, Ray Satiro wrote:
> On 10/24/2014 6:30 AM, Daniel Karunairatnam wrote:
>> I am able to build libssh2, but the instructions at [2] above refer
>> to the librarian node when compiling libcurl. there is a linker node
>> but not a librarian node when I open the 2010 libcurl.vcxproj file?
>
> There is no longer a lib/libcurl.vcproj, so I assume you are working
> with projects/Windows/VC10/lib/libcurl.vcxproj ? Maybe the
> instructions are no longer accurate for that updated project file. I
> will try the instructions over the weekend in Visual Studio 2010 to
> see if I can reproduce.

I have gone through the instructions. Were the instructions intended for
Debug or Release? Did the author intend just using one and mixing
configurations? Build both. Release LIBs should be used in Release
configurations and Debug LIBs should be used in Debug configurations.

Build OpenSSL twice following the directions in there for each
configuration but change the perl Configure command to this the first time:
perl Configure VC-WIN32 --prefix=c:/openssl_release_lib
and this the second:
perl Configure debug-VC-WIN32 --prefix=c:/openssl_debug_lib
Then you should have release in c:\openssl_release_lib and debug in
c:\openssl_debug_lib

Build libssh2 twice, following the same directions for each
configuration (LIB Debug, LIB Release) but use openssl_release_lib for
release and openssl_debug_lib for debug. Also for step 5b(ii) don't do
it for the LIB Release configuration. Then you should have release in
C:\libssh2-1.4.3\win32\Release_lib and debug in
C:\libssh2-1.4.3\win32\Debug_lib.

Don't follow the instructions in the libcurl section. There is no
lib\libcurl.vcproj, instead open projects\Windows\VC10\curl.sln. For
each configuration 'LIB Debug - LIB OpenSSL - LIB LibSSH2' and 'LIB
Release - LIB OpenSSL - LIB LibSSH2' follow the instructions below but
change <CONFIG> to release for LIB Release and debug for LIB Debug.

In project curlsrc:

'C/C++ > General > Additional Include Directories' and append:
;C:\openssl_<CONFIG>_lib\include;C:\libssh2-1.4.3\include

'Linker > General > Additional Library Directories' and append:
;C:\openssl_<CONFIG>_lib\lib;C:\libssh2-1.4.3\win32\<CONFIG>_lib

(For LIB Debug only): 'Linker > Input > Additional Dependencies' and
change libssh2d.lib to libssh2.lib.

In project libcurl:

'C/C++ > General > Additional Include Directories' and append:
;C:\openssl_<CONFIG>_lib\include;C:\libssh2-1.4.3\include

Build both configurations.

C:\curl-7.38.0\build\Win32\VC10\LIB Debug - LIB OpenSSL - LIB
LibSSH2>curld --version
curl 7.38.0 (i386-pc-win32) libcurl/7.38.0 OpenSSL/1.0.1j libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3
pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL

C:\curl-7.38.0\build\Win32\VC10\LIB Release - LIB OpenSSL - LIB
LibSSH2>curl --version
curl 7.38.0 (i386-pc-win32) libcurl/7.38.0 OpenSSL/1.0.1j libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3
pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL

This is still mixed because openssl uses the static CRT when you build
their LIBs and libssh2 and libcurl use the DLL CRT when you build their
LIBs. And personally I prefer openssl, libssh2, libcurl DLLs so when
there's a new version of libcurl and OpenSSL I can just replace the DLLs
rather than rebuild. Also don't forget there are the alternate ways to
build libcurl that we already discussed earlier in the thread as well if
you don't want to use the project files.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-27