Robotics StackExchange | Archived questions

Qmake and ROS project

I need to run ros code in my existing qmake qt project, without cmake/catkin_make.

All I need is to add relevant paths/libraries into my .pro file to run a ros publisher/subscriber.

I have tried INCLUDEPATH to the roscpp and rospy folder, and also tried as LIBS.

I get 'undefined reference to' for any ros code. I have also used #include "ros/ros.h"

Does anyone have information on how to use ros code in a QMAKE project?

Asked by JaneSheard on 2016-04-20 04:54:58 UTC

Comments

Answers

First answer (ignore if you are bound to qmake): Don't use qmake. Qt works pretty good with CMake, see https://doc.qt.io/qt-5/cmake-manual.html and https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html.

Second answer: I'm not familiar with qmake, but you have to set the include and library paths correctly. The include path has to be /opt/ros//include, the libraries have to be specified manually, that means /opt/ros//libs/libxxx.so and so on. Maybe you could paste your .pro file here for further help.

Asked by stertingen on 2019-04-15 06:00:45 UTC

Comments