运行catkin_make出现错误
Closed this issue · 10 comments
原因应该是c++11下的string(std::basic_string)当作参数传入非c++11的思岚SDK库(std::string),请问有什么解决方法?
If you just test the code from slamware_sdk_linux-x86_64-gcc4.8/samples. it is better by cmake and improve it by yourself. if you test my repo slamwareApp, by catkin_make and keep the raw commit . you shoud debug your code with your commit by yourslef.
我测试了你的slamwareApp,SlamwareCorePlatform::connect(ip_addres_, 1445)出现问题:
undefined reference to `rpos::robot_platforms::SlamwareCorePlatform::connect(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)'
ip_addres_的格式为std::__cxx11::basic_string c++11标准的,但是connect(const std::string& host, int port, int timeoutInMs = 10000)中的格式为std::string。
这个问题得怎么解决?可以提供一些建议吗?
关闭C++11特性后
思岚SDK的问题解决了,但是又出现新的问题:ros的库都出现了未定义引用的错误
对‘ros::init(int&, char**, std::string const&, unsigned int)’未定义的引用
对‘ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)’未定义的引用
对‘ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)’未定义的引用
......
我就是把你的代码运行在了Ubuntu16.04+Kinetic上,其他没有做改变
I try it on ubuntu 16.04 and it still has error. you should test it on ubuntu 14.04 (GCC 4.8) at first, I will try my best to solve this problem at my plan.