Where do library C header files go on Linux

djechlin picture djechlin · May 24, 2012 · Viewed 23.3k times · Source

Embarrassingly basic question. sudo apt-get install libmemcached6 - where do the .h's and .o's or .so's live in a typical install on a Linux machine (Ubuntu)? And, how do I make sure g++ can pick them up?

Answer

Francis Upton IV picture Francis Upton IV · May 24, 2012

They go to /usr/include and /usr/lib. If you use the -l option (for the libraries) it should find them from these standard places. If you include using <file.h> it should also get it from the right place.