Re: do_gettimeofday()undefined reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03Oct2009 15:22, anu4 s <arpalla@xxxxxxxxx> wrote:
| I am new to linux and facing a simple compile problem. I have written a C
| file which is using the do_gettimeofday() function.
| 
| #include <linux/time.h>
| #include <stdio.h>
| 
| main()
| {
|    struct timeval start;
| 
|    do_gettimeofday(&start);
|    printf ("%d", start.tv_usec);
| }
| 
| gcc a1.c --
|  undefined reference to `do_gettimeofday'

Are you sure it's not spelt "gettimeofday" ?

What makes you think there's a "do_" in there? (Sorry, my Linux box is
off just at present, but I'm going to be _really_ surprised if anything
in the main library is spelt "do_*".)

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux