qt开发ROS gui 遇到:global.h:1087:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. &quot......

具体错误如下:

一共出现38个错误

这个错误是在导入cmakelists.txt时产生的,其实不是工程本身的问题,是因为我卸载ros,再重新安装ros的过程中把qtcreator的部分包给删除了,导致qtcreator中没有了创建ros工程的项目。如下:

所以在重新安装qtcreator后问题就解决了。

安装过程:(ubuntu14.04)

sudo add-apt-repository ppa:levi-armstrong/qt-libraries-trusty
sudo add-apt-repository ppa:levi-armstrong/ppa  
sudo apt-get update && sudo apt-get install qt57creator-plugin-ros

猜你喜欢

转载自www.cnblogs.com/fuhang/p/9783296.html