max-mixture icon indicating copy to clipboard operation
max-mixture copied to clipboard

Complie error with g2o on master branch

Open twxjyg opened this issue 7 years ago • 1 comments

After run "cmake .."

-- /home/private/Documents/github-ws/g2o//cmake_modules -- G2O include dir is /home/private/Documents/github-ws/g2o -- G2O_TYPES_SLAM2D lib is /home/private/Documents/github-ws/g2o/lib/libg2o_types_slam2d.so -- G2O_TYPES_SLAM3D lib is /home/private/Documents/github-ws/g2o/lib/libg2o_types_slam3d.so -- G2O_STUFF_LIBS lib is /home/private/Documents/github-ws/g2o/lib/libg2o_stuff.so -- G2O_CORE_LIBS lib is /home/private/Documents/github-ws/g2o/lib/libg2o_core.so -- Found g2o -- Configuring done -- Generating done -- Build files have been written to: /home/private/Documents/github-ws/max-mixture/build

After run "make"

from /home/private/Documents/github-ws/max-mixture/src/types_g2o_mixture.cpp:27: /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from /home/private/Documents/github-ws/g2o/g2o/core/factory.h:32:0, from /home/private/Documents/github-ws/max-mixture/src/types_g2o_mixture.cpp:27: /home/private/Documents/github-ws/g2o/g2o/core/hyper_graph.h:138:15: error: ‘unordered_map’ in namespace ‘std’ does not name a type ...

I did try to add complie FLAG "-std=c++11" but not work.

twxjyg avatar Jun 21 '17 09:06 twxjyg

I added a line in CMakeList.txt: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -ggdb") and compile is successed.

twxjyg avatar Jun 21 '17 09:06 twxjyg