Open CCHLENG opened 2 years ago
Did you ever find a solution to this? I am having a very similar error when building both the libraries.
windows11 x64 Qt 5.14 MinGW 7.3.0 64-bit octomap v1.10.0
[ 54%] Built target test_mapcollection
[ 56%] Built target test_pruning
[ 58%] Built target test_bbx
[ 60%] Built target unit_tests
[ 65%] Built target octovis-static
[ 66%] Linking CXX shared library ..\..\bin\liboctovis.dll
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text+0x1288): undefined reference to `__imp__ZN6QTimerD1Ev'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text+0x12be): undefined reference to `__imp__ZN7QObjectD2Ev
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text+0x1314): undefined reference to `__imp__ZN6QTimerD1Ev'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text+0x134a): undefined reference to `__imp__ZN7QObjectD2Ev
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZN5QListIPN9qglviewer12MouseGrabberEE13detach_helperEi[_ZN5QListIPN9qglviewer12MouseGrabberEE13detach_helperEi]+0x1b): undefined reference to `__imp__ZN9QListData6detachEi'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZN5QListIPN9qglviewer12MouseGrabberEE13detach_helperEi[_ZN5QListIPN9qglviewer12MouseGrabberEE13detach_helperEi]+0x7d): undefined reference to `__imp__ZN9QListData7disposeEPNS_4DataE'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZN9qglviewer16ManipulatedFrameD0Ev[_ZN9qglviewer16ManipulatedFrameD0Ev]+0x2d): undefined reference to `__imp__ZN6QTimerD1Ev'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZN9qglviewer16ManipulatedFrameD0Ev[_ZN9qglviewer16ManipulatedFrameD0Ev]+0x63): undefined reference to `__imp__ZN7QObjectD2Ev'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZThn88_N9qglviewer16ManipulatedFrameD0Ev[_ZThn88_N9qglviewer16ManipulatedFrameD0Ev]+0x2e): undefined reference to `__imp__ZN6QTimerD1Ev'
CMakeFiles\octovis-shared.dir/objects.a(SelectionBox.cpp.obj):SelectionBox.c:(.text$_ZThn88_N9qglviewer16ManipulatedFrameD0Ev[_ZThn88_N9qglviewer16ManipulatedFrameD0Ev]+0x63): undefined reference to `__imp__ZN7QObjectD2Ev'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [octovis\CMakeFiles\octovis-shared.dir\build.make:187: ../../bin/liboctovis.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1807: octovis/CMakeFiles/octovis-shared.dir/all] Error 2
mingw32-make: *** [Makefile:165: all] Error 2
windows10 x64 Qt 5.7 MinGW 5.3.0 32bit octomap 1.9.6
Build follow octovis/README.md. octovis is built successful. I can find QGLViewer2.dll, libQGLViewer2.a, QGLViewerd2.dll, libQGLViewerd2.a in octomap-1.9.6\octovis\src\extern\QGLViewer. But when i builing octomap, error code like following:
It looks like QTimer and QObject in SelectionBox.cpp can't be found, what should i do? thanks.