title: libcvd - undefined reference to "x..." while compiling c++
body: <p>I am trying to build libCVD in order to use with ROS (from www.ros.org).
  My Problem is that I am getting the following errors:</p>
  
  <pre><code>make[3]: Entering directory `/opt/ros/groovy/stacks/tum_ardrone/thirdparty/libcvd/build'
  /usr/bin/g++-4.6 -o progs/cvd_display_image progs/cvd_display_image.o -L. -lcvd  -ltiff -ljpeg -lpng -lpng -llapack -lGLU -lGL -lrt  -L -lX11 -lXext -pthread
  
  ./libcvd.so: undefined reference to `XMoveWindow'
  ./libcvd.so: undefined reference to `XCreateGlyphCursor'
  ./libcvd.so: undefined reference to `XStoreName'
  ./libcvd.so: undefined reference to `XLookupString'
  ./libcvd.so: undefined reference to `XFreeFont'
  ./libcvd.so: undefined reference to `XSetClassHint'
  ./libcvd.so: undefined reference to `XCreateWindow'
  ./libcvd.so: undefined reference to `XCreateColormap'
  ./libcvd.so: undefined reference to `XOpenDisplay'
  ./libcvd.so: undefined reference to `XDestroyWindow'
  ./libcvd.so: undefined reference to `XCloseDisplay'
  ./libcvd.so: undefined reference to `XUnmapWindow'
  ./libcvd.so: undefined reference to `XNextEvent'
  ./libcvd.so: undefined reference to `XSetWMProtocols'
  ./libcvd.so: undefined reference to `XResizeWindow'
  ./libcvd.so: undefined reference to `XMapWindow'
  ./libcvd.so: undefined reference to `XSelectInput'
  ./libcvd.so: undefined reference to `XFlush'
  ./libcvd.so: undefined reference to `XWarpPointer'
  ./libcvd.so: undefined reference to `XLoadQueryFont'
  ./libcvd.so: undefined reference to `XDefineCursor'
  ./libcvd.so: undefined reference to `XInternAtom'
  ./libcvd.so: undefined reference to `XQueryPointer'
  ./libcvd.so: undefined reference to `XUndefineCursor'
  ./libcvd.so: undefined reference to `XGetWindowAttributes'
  ./libcvd.so: undefined reference to `XPending'
  collect2: ld returned 1 exit status
  make[3]: *** [progs/cvd_display_image] Error 1
  make[3]: Leaving directory `/opt/ros/groovy/stacks/tum_ardrone/thirdparty/libcvd/build'
  make[2]: *** [libcvd_built] Error 2
  </code></pre>
  
  <p>There is an other stackoverflow question with nearly similar errors (<a href="https://stackoverflow.com/questions/14939242/undefined-reference-error-while-compiling-libcvd/16077571#16077571">undefined reference error while compiling libcvd</a>).</p>
  
  <p>I tried like it is suggested there to find out why there is no path given with the second -L option. So I ended up in the projects configure.in file, where I believe the error happens.
  But I have no experience with this build system, so help would be great.</p>
  
  <p>The configure.in file is available under <a href="https://dl.dropboxusercontent.com/u/16804463/configure.in" rel="nofollow noreferrer">https://dl.dropboxusercontent.com/u/16804463/configure.in</a></p>
  
  <p>Thanks in advance.</p>