error: 'to_string' is not a member of 'std'
程序员文章站
2022-07-13 22:18:58
...
我用海思的arm-hisiv300-linux-g++交叉编译dronecode-sdk,报错
error: 'to_string' is not a member of 'std'
arm-hisiv300-linux-g++是支持c++11的,头文件<string>也包含了,还是报错。
查百度,都说是加上-std=c++11 但是我这个已经加上,还是不行,后来看了一个帖子说由于工具链本身没有使用标准的c++11库,导致编译不了,
解决办法:Cmakelists.txt 需要加上以下几个选项;如果是makefile文件,同样的道理;
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-D_GLIBCXX_USE_C99=1)
推荐阅读
-
jQuery的$.get()函数不执行以及php端报错Uncaught Error: Call to a member function bind_param() on boolean in...
-
error: ‘ceil‘ is not a member of ‘std‘ | error: ‘floor‘ is not a member of ‘std‘
-
error: ‘PassThrough’ is not a member of ‘pcl’
-
error: ‘accumulate’ is not a member of ‘std’
-
error: 'to_string' is not a member of 'std'
-
error: ‘to_string’ is not a member of ‘std’
-
error: ‘to_string’ is not a member of ‘std’
-
【Spark】error: value foreach is not a member of Object
-
error: object MultivariateNormalDistribution is not a member of package
-
编译报错: error: ‘undistortPoints’ is not a member of ‘cv’