cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Getting undefined reference to 'clock_getTime' error..

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 2 Mar 2012 15:48:12 +0100

On Fri, Mar 02, 2012 at 04:01:59PM +0530, Yuvi yuvi wrote:
> I have cross compile, OpenSSl , libssh2 and finally cURL, Don't know why it has
> generated only static library. Anyway I tried to run sample ftpget.c program by
> linking all the three libraries but I am getting the following error :
>
> .../libcurl.a(timeval.o): In function 'curlx_tvnow':
> timeval.c:(.text+0xfc): undefined reference to 'clock_gettime'
> collect2: ld return  1 exit status
> make: *** [all] Error 1
>
>  Please help me resolve this error, Is there need to cross-compile any other
> library also ?

How did you link the app? If you use the flags from
'curl-config --static-libs' then you shouldn't have any problems
linking. You're probably missing -lrt.

>>> Dan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-02