timer_gettime unresolved error

I have used get_time() in my program but when I try to compile it it is giving the following error:

One possible approach:

(1) Go to all your library directories.

(2) Run your favorite system command to list the
contents of the routines in the libraries.

(3) See if you can find the lib with your function.

(4) Make sure the path of that archive is in either
your LDPATH or in your ldconfig file.

(5) If you add the path to the ldconfig file, then
you must rerun ldconfig. Easy to test with
the LDPATH environmental var.

If you do not find the archive in 1 - 3 then you have
to either:

(1) Locate the lib for your OS and install.

(2) Find the correct source tree for your OS.

(3) Rewrite the source with the appropriate libs.

There may be better approaches. You can also check
the README files and Makefiles for lib information,
configuration suggestions, etc. Normally, modern
distributions with check for this using a configure

Perhaps another forum poster has a better idea.

make sure you are using '#include <time.h>'

[Edited by Neo on 10-27-2000 at 10:19 PM]

I had included #include<time.h>

[Edited by Neo on 10-27-2000 at 10:02 PM]

I have searched the library and found the file but the problem is when I first ran a posix thread program I had similar error for pthread_create at that time I had used
cc -o thr1 thr1.c -pthread

Is there any general way for getting rid of these unresolved problems.

[Edited by Neo on 10-27-2000 at 10:20 PM]

If the error is coming from ld() then adding an
include (#include foo.h) will not solve the problem
because the error occurs during the linking phase,
linking objects, and not the preprocessing and
compiling phase.
Since the poster indicates that the error came from
ld() then they are missing a compiled object and either
the object is missing or the path to the object is missing
in the linking phase.