Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

compile time error when calling getmicrotime()

1 view
Skip to first unread message

fre...@libkvm.org

unread,
Mar 27, 2003, 9:28:12 AM3/27/03
to
hi,

i am trying to call getmicrotime(&tv) in a program but i
get the following error when compiling :

/tmp/ccfMfSM6.o(.text+0xe): undefined reference to `getmicrotime'

yes, i have declared '#include <sys/time.h>' :-)

FreeBSD 5.0-RELEASE-p4 i386
FreeBSD 4.7-RELEASE-p9 i386

any comment welcome.

thanks

julien mabillard.
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs...@freebsd.org"

p...@phk.freebsd.dk

unread,
Mar 27, 2003, 9:29:59 AM3/27/03
to
In message <20030327142...@postel.libkvm.org>, fre...@libkvm.org write
s:

>hi,
>
>i am trying to call getmicrotime(&tv) in a program but i
>get the following error when compiling :
>
>/tmp/ccfMfSM6.o(.text+0xe): undefined reference to `getmicrotime'
>
>yes, i have declared '#include <sys/time.h>' :-)
>
>FreeBSD 5.0-RELEASE-p4 i386
>FreeBSD 4.7-RELEASE-p9 i386

That is a kernel function you are trying to call.

Use gettimeofday(2)

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
p...@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

0 new messages