cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Problems with curl_easy_geting() and linking with libcurl 7. 10.3

From: Isbell, Michael <Michael_Isbell_at_bmc.com>
Date: Fri, 28 Mar 2003 18:46:38 -0600

Link problems solved. BUT, I am still getting wrong results of code below
using 7.10.3 libs

                -----Original Message-----
                From: Isbell, Michael
                Sent: Friday, March 28, 2003 6:44 PM
                To: 'curl-library_at_lists.sourceforge.net'
                Subject: Problems with curl_easy_geting() and linking with
libcurl 7.10.3
                Importance: High

                When using curl 7.8.1, it seems that curl_easy_geting() is
not working. It returns 0 time. Note that the url below is not the one I
used.

                I then updated my curl libs etc to:
                libcurl 7.10.3
                curl 7.10.3 (sparc-sun-solaris2.8) libcurl/7.10.3
OpenSSL/0.9.6g zlib/1.1.3

                And I get a ld error:

                cc curl_test.c -I/opt/include -L/opt/lib -lcurl -lz -ldl
-lsocket -lnsl -lz -o curl_test
                Undefined first referenced
                 symbol in file
                __floatdidf /opt/lib/libcurl.so
                ld: fatal: Symbol referencing errors. No output written to
curl_test
                make: *** [curl_test] Error 1

                Compiler
                cc: WorkShop Compilers 5.0 98/12/15 C 5.0

        
8<---------------------------code--------------------------------------

                #include <stdio.h>
                #include <stdlib.h>
                #include <unistd.h>
                #include <string.h>
                #include <pthread.h>
                #include <curl/curl.h>

                /*int createIdleClients()*/
                main()
                {
                  CURL *curl;
                  CURLcode res;
                  double *tot_time;

                  tot_time = malloc(sizeof(double));

                  curl = curl_easy_init();

                  curl_easy_setopt(curl,CURLOPT_URL,"yahoo.bmc.com");
        
curl_easy_setopt(curl,CURLOPT_USERPWD,"blablabla:wowobmc");
                  res = curl_easy_perform(curl);

                  res =
curl_easy_getinfo(curl,CURLINFO_TOTAL_TIME,tot_time);
                  printf("\n\nCURLINFO_TOTAL_TIME RESULT: %d\n",res);

                  printf("TOTAL TIME: %lf\n",tot_time);

                  curl_easy_cleanup(curl);
                  free(tot_time);

                  return 0;
                }

        
8<-----------------------------output-----------------------------------
                CURLINFO_TOTAL_TIME RESULT: 0
                TOTAL TIME: 0.000000

-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
Received on 2003-03-29