tum-vision / fastfusion

Volumetric 3D Mapping in Real-Time on a CPU
GNU General Public License v2.0
556 stars 173 forks source link

Compiling error : cannot find -lqglviewer-qt4 #14

Open billbliss3 opened 7 years ago

billbliss3 commented 7 years ago

I have install libqglviewer-dev libqglviewer-dev-qt4 libqglviewer-doc but still not work could you recommand a library package for me?

The error list is as follow: [ 36%] Built target geometryfusion_aos [ 44%] Built target camerautils [ 68%] Built target auxiliary [ 80%] Built target geometryfusion_mipmap_cpu [ 84%] Linking CXX executable ../bin/onlinefusion /usr/bin/ld: cannot find -lqglviewer-qt4 collect2: error: ld returned 1 exit status src/CMakeFiles/onlinefusion.dir/build.make:174: recipe for target 'bin/onlinefusion' failed make[2]: * [bin/onlinefusion] Error 1 CMakeFiles/Makefile2:96: recipe for target 'src/CMakeFiles/onlinefusion.dir/all' failed make[1]: * [src/CMakeFiles/onlinefusion.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *\ [all] Error 2

maoLB commented 7 years ago

I have the same problem.Did you fix it?

MichaelGrupp commented 7 years ago

The reason is simple: In the install directory (for me it was _usr/lib/x8664-linux-gnu/), the name of the installed library is libQGLViewer-qt4.so. However, fastfusion's CMakeLists.txt (src/CMakeLists.txt) expects the library name as qglviewer-qt4 at line 25. You just have to change the name to QGLViewer-qt4 to make it work:

...

message(STATUS "Did not find qglviewer2, linking qglviewer-qt4")

set(QGLVIEWER QGLViewer-qt4)

...