Ask Your Question
0

RGBDSLAM_V2: Undefined reference

asked 2014-10-20 16:59:30 -0500

AndrewLawson gravatar image

updated 2014-10-20 17:01:14 -0500

Hello,

I'm trying to use RGBDSLAM_V2 on ARM and get this strange error when I run catkin_make:

...
[ 90%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/transformation_estimation.o
[ 92%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/header.o
[ 94%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/covariance_estimation.o
[ 96%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/feature_adjuster.o
[ 98%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/aorb.o
[100%] Building CXX object rgbdslam_v2/CMakeFiles/rgbdslam.dir/src/features.o
In file included from /opt/ros/hydro/include/opencv2/flann/kmeans_index.h:50:0,
                 from /opt/ros/hydro/include/opencv2/flann/all_indices.h:38,
                 from /opt/ros/hydro/include/opencv2/flann/flann_base.hpp:44,
                 from /opt/ros/hydro/include/opencv2/flann/flann.hpp:50,
                 from /opt/ros/hydro/include/opencv/cv.h:69,
                 from /home/pb1/catkin_ws/src/rgbdslam_v2/src/features.cpp:16:
/opt/ros/hydro/include/opencv2/flann/logger.h:73:9: note: the mangling of 'va_list' has changed in GCC 4.4
Linking CXX executable /home/pb1/catkin_ws/devel/lib/rgbdslam/rgbdslam
CMakeFiles/rgbdslam.dir/src/misc.o: In function `g2o2QMatrix(g2o::SE3Quat)':
/home/pb1/catkin_ws/src/rgbdslam_v2/src/misc.cpp:81: undefined reference to `QMatrix4x4::QMatrix4x4(double const*)'
CMakeFiles/rgbdslam.dir/src/graph_manager.o: In function `QMatrix4x4 eigenTF2QMatrix<Eigen::Transform<double, 3, 1, 0> >(Eigen::Transform<double, 3, 1, 0> const&)':
/home/pb1/catkin_ws/src/rgbdslam_v2/src/misc.h:44: undefined reference to `QMatrix4x4::QMatrix4x4(double const*)'
collect2: ld returned 1 exit status
make[2]: *** [/home/pb1/catkin_ws/devel/lib/rgbdslam/rgbdslam] Error 1
make[1]: *** [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

Any idea how to fix this? I'd really appreciate it. Before doing this, I did change the typedef of qreal in Qt from float to double on my system - could that be causing any issues here?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-20 17:43:21 -0500

ahendrix gravatar image

This is almost certainly caused by changing the definition of qreal.

The QMatrix4x4 constructor in question takes a qreal *. Since the QT library was compiled with one definition of qreal, and you've now changed the header to have a different definition, the linker is now looking for the wrong function in the QT library.

The lesson here is that you shouldn't modify the installed headers.

If you REALLY, REALLY, REALLY want to change the definition of qreal, you'll need to build all of QT from source with your changes. Beware that if you install a modified version of QT as the default, anything that was linked against the stock version will probably no longer work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-10-20 16:59:30 -0500

Seen: 439 times

Last updated: Oct 20 '14