Closed gyt290811 closed 2 years ago
Hi, When compiling the ouster_example, I got a problem as following: (base) roma@roma-NUC11TNKi5:~/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build$ cmake /home/roma/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON -- Ouster SDK client: Using EIGEN_MAX_ALIGN_BYTES = 32 -- Configured GL loader: GLEW -- Configuring done -- Generating done -- Build files have been written to: /home/roma/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build (base) roma@roma-NUC11TNKi5:~/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build$ cmake --build . Generating build info header [ 0%] Built target ouster_generate_header [ 33%] Built target ouster_client [ 39%] Built target ouster_pcap [ 63%] Built target ouster_viz [ 69%] Built target config_example [ 75%] Built target client_example [ 84%] Built target lidar_scan_example [ 87%] Linking CXX executable viz_example /usr/bin/ld: /usr/local/lib/libglfw3.a(posix_thread.c.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status examples/CMakeFiles/viz_example.dir/build.make:105: recipe for target 'examples/viz_example' failed make[2]: ** [examples/viz_example] Error 1 CMakeFiles/Makefile2:408: recipe for target 'examples/CMakeFiles/viz_example.dir/all' failed make[1]: [examples/CMakeFiles/viz_example.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: * [all] Error 2
Is there any solutions for this error?
I got it, It's my fault. I didn't set C++ 11, just add one command into cmakelist. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
Hi, When compiling the ouster_example, I got a problem as following: (base) roma@roma-NUC11TNKi5:~/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build$ cmake /home/roma/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON -- Ouster SDK client: Using EIGEN_MAX_ALIGN_BYTES = 32 -- Configured GL loader: GLEW -- Configuring done -- Generating done -- Build files have been written to: /home/roma/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build (base) roma@roma-NUC11TNKi5:~/GYT_SPACE/catkin_lc/src/outster_phoxi/ouster_example/build$ cmake --build . Generating build info header [ 0%] Built target ouster_generate_header [ 33%] Built target ouster_client [ 39%] Built target ouster_pcap [ 63%] Built target ouster_viz [ 69%] Built target config_example [ 75%] Built target client_example [ 84%] Built target lidar_scan_example [ 87%] Linking CXX executable viz_example /usr/bin/ld: /usr/local/lib/libglfw3.a(posix_thread.c.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status examples/CMakeFiles/viz_example.dir/build.make:105: recipe for target 'examples/viz_example' failed make[2]: ** [examples/viz_example] Error 1 CMakeFiles/Makefile2:408: recipe for target 'examples/CMakeFiles/viz_example.dir/all' failed make[1]: [examples/CMakeFiles/viz_example.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: * [all] Error 2
Is there any solutions for this error?