cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl giving unhandled exception [was Re: unresolved symbol in 7.14.0]

From: JB <curl_at_itpsg.com>
Date: Wed, 31 Aug 2005 14:05:10 -0600

> On Mon, 29 Aug 2005, JB wrote:
>
> > I was under the impression from the docs that the statically compiled
> > libcurl.lib also has the statically compiled ssl libraries incorporated
into
> > it.
>
> You can most probably make your build do that too with a little
convincing.
>

Not necessary, I just pointed vc++ at the openssl .libs and all was good

> > libcurl.lib(timeval.obj) : error LNK2019: unresolved external symbol
> > __imp__timeGetTime_at_0 referenced in function _gettimeofday
> >
> > Any help on dealing with this would be much appreciated!
>
> I believe -lwinmm is the key, as used by Makefile.m32.
>
> Or as the code comment in lib/timeval.c says:
>
> "Need to link against winmm.lib for this"
>

Fair enough, I added winmm.lib to my list of files to link with and all went
well. Thanks for the prompt reponse.

However, now I have a new problem.
In one of my classes functions, I have (tried with curl_global_init both
uncommented and commented as it isn't clear from the docs if curl_easy_init
calls it for you):

 CURL *curl;
 CURLcode res;

// curl_global_init(CURL_GLOBAL_WIN32 | CURL_GLOBAL_SSL);
 curl = curl_easy_init();
 if (curl)
 {
  curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/");
  res = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
 }
// curl_global_cleanup();

When I run the above, I get an unhandled exception after attempting to free
mem on the heap. The call stack looks like:
  msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x015d4d40)
Line 1807 C
  msvcr71d.dll!_free_dbg_lk(void * pUserData=0x015d4d40, int nBlockUse=1)
Line 1132 + 0x9 C
  msvcr71d.dll!_free_dbg(void * pUserData=0x015d4d40, int nBlockUse=1) Line
1070 + 0xd C
  msvcr71d.dll!free(void * pUserData=0x015d4d40) Line 1025 + 0xb C
  client.exe!_Curl_destroy_thread_data() + 0x13 C
  client.exe!_Curl_wait_for_resolv() + 0x175 C
  client.exe!_Curl_follow() + 0x4cc C
  client.exe!_Curl_perform() + 0x40 C
  client.exe!_curl_easy_perform() + 0x66 C
  client.exe!CMogClientTabPage::TestClientServer() Line 69 + 0x9 C++

Any ideas? This is basically right out of the tutorial
Received on 2005-08-31