coffeenet coffeenet - 4 months ago 22x
Linux Question

How do I build (get/download) time.h library?

I am trying to build a project on Linux via Makefile.

I keep getting

cannot find <sys/time.h>

I asked around, and I was told that my project doesn't have access to library folders.

Therefore, I am trying to solve this problem by using the time library locally inside my project's folder.
I am very new to Linux. So, please forgive my question if it sounds naive.

I found this, but I don't know what files I need, and how to build the library.;a=tree;f=time;h=c950c5d4dd90541e8f3c7e1649fcde4aead989bb;hb=master

  • Where can I find the time.h library/package?

  • How do I build the library?


On Debian-derived distributions, apt-get install libc6-dev will get the required header files. You will need them for pretty much any C project. In the general case, Debian package search or apt-file can tell you where to find missing library etc files.