Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So the x11 directory defined in the makefile is: usr/X11R6/lib64, which does not exist. however, the project compiles perfectly in Kdevelop and runs with no problems.

If I take out all inclusions of x11 in the makefile, it doesn't compile.

(1) Does the compiler search for x11 libs somehow if the dir specified does not exist?

(2) How can I find where exactly x11 libs are in my computer?

For (2), I've found /usr/lib/X11, but I can't find any library files in there...

(I am attempting to rewrite the makefile in CMake format in Kubuntu, if that matters at all.)


share|improve this question
  1. Yes, gcc checks /usr/include to satisfy #include directives by default.

  2. Try locate -b '\X.h'. My system finds it in /usr/include/X11.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.