mardi 27 juillet 2021

ros kinetic compile with c++11 seems not working

I make a ros package, and in it I write

typedef std::array<float,6> Tmat; 

I found this is new in c++11, and follow many instructions, I uncomment related lines in CMakelists.txt

add_compile_options(-std=c++11)
SET(CMAKE_BUILD_TYPE Debug)

in both CMakelists in package and whole project. But still I get this when catkin_make:

error: ‘array’ in namespace ‘std’ does not name a template type
 typedef std::array<float,6> Tmat;

Anyone have clue about what am I doing wrong here?

Aucun commentaire:

Enregistrer un commentaire