linux - libcvd - undefined reference to "x..." while compiling c++ -
i trying build libcvd in order use ros (from www.ros.org). problem getting following errors:
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 `xmovewindow' ./libcvd.so: undefined reference `xcreateglyphcursor' ./libcvd.so: undefined reference `xstorename' ./libcvd.so: undefined reference `xlookupstring' ./libcvd.so: undefined reference `xfreefont' ./libcvd.so: undefined reference `xsetclasshint' ./libcvd.so: undefined reference `xcreatewindow' ./libcvd.so: undefined reference `xcreatecolormap' ./libcvd.so: undefined reference `xopendisplay' ./libcvd.so: undefined reference `xdestroywindow' ./libcvd.so: undefined reference `xclosedisplay' ./libcvd.so: undefined reference `xunmapwindow' ./libcvd.so: undefined reference `xnextevent' ./libcvd.so: undefined reference `xsetwmprotocols' ./libcvd.so: undefined reference `xresizewindow' ./libcvd.so: undefined reference `xmapwindow' ./libcvd.so: undefined reference `xselectinput' ./libcvd.so: undefined reference `xflush' ./libcvd.so: undefined reference `xwarppointer' ./libcvd.so: undefined reference `xloadqueryfont' ./libcvd.so: undefined reference `xdefinecursor' ./libcvd.so: undefined reference `xinternatom' ./libcvd.so: undefined reference `xquerypointer' ./libcvd.so: undefined reference `xundefinecursor' ./libcvd.so: undefined reference `xgetwindowattributes' ./libcvd.so: undefined reference `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
there other stackoverflow question similar errors (undefined reference error while compiling libcvd).
i tried suggested there find out why there no path given second -l option. ended in projects configure.in file, believe error happens. have no experience build system, great.
the configure.in file available under https://dl.dropboxusercontent.com/u/16804463/configure.in
thanks in advance.
the chosen solution in other question not right. right solution 1 that's not chosen: error have missing path in link line. link line contains: -l -lx11
. there should pathname after -l
. since there isn't, linker assumes pathname next argument, -lx11
. means linker doesn't link actual libx11.so
library because it's treating library reference path instead.
you need @ makefile
, find rule link cvd_display_image.o target, , see going on here. mentioned in other answer, you'll find link line -l$(some_variable)
, variable empty. need set variable value, perhaps running make some_variable=.
or make some_variable=/usr/lib
or whatever.
seeing configure.in
file not useful: important part makefile.
in event should report maintainers of software can fix it: have real error here multiple people running it.
Comments
Post a Comment