我正在尝试构建 libCVD 以便与 ROS 一起使用(来自 www.ros.org)。我的问题是我收到以下错误:
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
还有一个 stackoverflow 问题几乎有类似的错误(编译 libcvd 时出现未定义的参考错误)。
我尝试了那里的建议,以找出为什么第二个 -L 选项没有给出路径。所以我最终进入了项目 configure.in 文件,我相信错误发生在该文件中。但我对这个构建系统没有经验,所以帮助会很大。
configure.in 文件位于https://dl.dropboxusercontent.com/u/16804463/configure.in
提前致谢。