cURL / Mailing Lists / curl-library / Single Mail


Re: Build error: with_ssh2=static, VC9,

From: Jan Ehrhardt <>
Date: Wed, 24 Oct 2012 00:02:02 +0200

Ping. Did Daniel or Gunther already have a chance to look at the
proposed patches below?


Jan Ehrhardt in gmane.comp.web.curl.library (Fri, 19 Oct 2012 02:43:40
>I am building libcurl_a.lib from the commandline, using VC9:
>nmake /f mode=static VC=9 MACHINE=x86
> WITH_DEVEL=../../win32build USE_IDN=yes WITH_WINSSL=static
> WITH_SSH2=static WITH_ZLIB=static
>This fails with:
>libcurl_a.lib(agent.obj) : error LNK2019: unresolved external symbol
> __imp_FindWindowA referenced in function agent_connect_pageant
>libcurl_a.lib(agent.obj) : error LNK2019: unresolved external symbol
> __imp_SendMessageA referenced in function agent_transact_pageant
>At first I solved this by recompiling libssh2 without agent_ops_pageant.
>Recompiling libssh2 showed me that the missing symbols can be found in
> __imp__FindWindowA 100171f0 user32:USER32.dll
>Moreover, libssh2 includes user32.lib while linking.
>So, I changed line 135 in winbuild/ from
>-SSH2_LIBS = libssh2_a_debug.lib
>+SSH2_LIBS = libssh2_a_debug.lib user32.lib
>And libcurl builds fine again.
>Then I checked the preceding line 131 as well:
>-SSH2_LIBS = libssh2.lib
>+SSH2_LIBS = libssh2_a.lib user32.lib
>libssh2_a.lib is better than libssh2.lib, because libssh2 produces an
>_a.lib as standard, just like curl. And the user32.lib is also needed
>for with_ssh2=dll.

List admin:
Received on 2012-10-24