title: qt编译报错:error: in C++98 'xxxx' must be initialized by constructor, not by '{...}'
date: 2020-07-10 08:01:26
tags: 踩坑记录
qt编译报错:error: in C++98 'xxxx' must be initialized by constructor, not by '{...}'
};
^
在学习qt开发ros插件时遇到一个编译报错,原因是用到了C++11,而编译是C++98,
error: in C++98 'moveBindings' must be initialized by constructor, not by '{...}'
};
^
处理方法:
在这个package下的CMakelists.txt文件加入这条代码。
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")