cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl eas built whitout LIBSSH2

From: Stephen Collyer <scollyer_at_netspinner.co.uk>
Date: Wed, 23 Apr 2008 14:22:34 +0100

Karandeep Malik wrote:
> On Wed, Apr 23, 2008 at 6:06 PM, Stephen Collyer
> <scollyer_at_netspinner.co.uk> wrote:
>> mikep_at_proatria.com wrote:
>>> This is now available at:
>>> http://curl.haxx.se/download/libcurl-7.18.0-win32-openssl-libssh2.zip
>> I'm getting link errors from VS2005 when trying to link against
>> this library. I can successfully link the same code against
>> a pre-built libcurl-7.15.0 downloaded from curl.haxx.se
>>
>> A sample error is:
>>
>>> HTTP.obj : error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function "public: __thiscall MDP::HTTP::HTTP(void)"
>> Does anyone have any idea what could be going wrong here ?
>> AFAICS the linker is looking at the correct directory to
>> pick up the libraries as the build log contains this:
>>
>>> /LIBPATH:"..\..\..\..\external-libs\win32\curl"
>> which is the correct location for libcurl.lib
>>
>> (And while I'm thinking about it, where does that leading
>> __imp__ in the symbol name come from ? Is that the prefix
>> used by VS when it looks in the list of symbols exported by
>> a library ?)
>>
>> --
>> Regards
>>
>> Steve Collyer
>> Netspinner Ltd
>>
>
> Do you have the updated OPENSSL libraries linked. Please check.

I'm not sure what you mean by "linked", but they are in the
same directory as libcurl - here's a Unix ls -l listing:

> -rw-r--r-- 1 stephen users 212992 2008-03-28 12:05 libcurl.dll
> -rw-r--r-- 1 stephen users 7442 2008-03-28 12:05 libcurl.exp
> -rw-r--r-- 1 stephen users 1521948 2008-03-28 12:05 libcurl.lib
> -rw-r--r-- 1 stephen users 1097728 2008-03-28 12:05 libeay32.dll
> -rw-r--r-- 1 stephen users 451491 2008-03-28 12:05 libeay32.exp
> -rw-r--r-- 1 stephen users 664738 2008-03-28 12:05 libeay32.lib
> -rw-r--r-- 1 stephen users 163914 2008-03-28 12:05 libssh2.dll
> -rw-r--r-- 1 stephen users 11818 2008-03-28 12:05 libssh2.exp
> -rw-r--r-- 1 stephen users 20848 2008-03-28 12:05 libssh2.lib
> -rw-r--r-- 1 stephen users 295750 2008-03-28 12:05 libssh.lib
> -rw-r--r-- 1 stephen users 204800 2008-03-28 12:05 ssleay32.dll
> -rw-r--r-- 1 stephen users 35319 2008-03-28 12:05 ssleay32.exp
> -rw-r--r-- 1 stephen users 52408 2008-03-28 12:05 ssleay32.lib
> -rw-r--r-- 1 stephen users 100998 2008-03-28 12:05 zlib.lib

These are the libraries that were (very usefully) included in the
package made by Mike. I've merely moved them all into the directory
that VS picks up via the LIBPATH directive.

However, the symbols that are not found are those from libcurl rather
than from ssleay32, so I'm not sure that helps anyway.

-- 
Regards
Steve Collyer
Netspinner Ltd
Received on 2008-04-23