curl-library
static linking with libssh2
Date: Fri, 22 Aug 2008 16:38:21 +0300
Hi!
I'm using Visual Studio 2008 on a Windows 32 system and I'm attempting to
create a static libcurl library with SFTP support. I'm running into trouble
linking with the libssh2 library. I have already compiled the openssl
(0.9.8h) and the libssh2 (0.18) libraries as static libraries. I have also
compiled the libcurl static library using the CURL_STATIC option and
everything compiled fine. The problems appears once I compile a test
applications that uses the curl library. The linker gives me the following
error:
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_free referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_disconnect_ex referenced in function
_ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_free referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_wait_closed referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_wait_eof referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_send_eof referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_scp_recv referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_scp_send_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_shutdown referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_close_handle referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_readdir_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_seek referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_open_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_unlink_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_rmdir_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_rename_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_mkdir_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_stat_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_last_error referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_symlink_ex referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_init referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_userauth_keyboard_interactive_ex referenced in function
_ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_userauth_password_ex referenced in function
_ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_last_error referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_userauth_publickey_fromfile_ex referenced in function
_ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_last_errno referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_userauth_list referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_hostkey_hash referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_set_blocking referenced in function
_ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_startup referenced in function _ssh_statemach_act
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_session_init_ex referenced in function _ssh_connect
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_write_ex referenced in function _Curl_scp_send
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_channel_read_ex referenced in function _Curl_scp_recv
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_write referenced in function _Curl_sftp_send
1>curllib.lib(ssh.obj) : error LNK2019: unresolved external symbol
__imp__libssh2_sftp_read referenced in function _Curl_sftp_recv
It looks to me as if the libcurl expects the libssh2 function to be in a
DLL even though I've compiled everything statically. Any ideas on how I can
fix this?
Thank you in advance for your help!
Andrei
Received on 2008-08-22