do_gettimeofday()undefined reference
Cameron Simpson
cs at zip.com.au
Sat Oct 3 22:33:22 UTC 2009
On 03Oct2009 15:22, anu4 s <arpalla at gmail.com> 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 at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
More information about the fedora-list
mailing list