curl-library
Build error: with_ssh2=static, VC9, makefile.vc
Date: Fri, 19 Oct 2012 02:43:40 +0200
I am building libcurl_a.lib from the commandline, using VC9:
nmake /f makefile.vc 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
user32.dll:
__imp__FindWindowA 100171f0 user32:USER32.dll
Moreover, libssh2 includes user32.lib while linking.
So, I changed line 135 in winbuild/MakefileBuild.vc from
-SSH2_LIBS = libssh2_a_debug.lib
into
+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.
Jan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-19