ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Qmake and ROS project

asked 2016-04-20 04:54:58 -0600

JaneSheard gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-15 06:00:45 -0600

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/man... .

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/<distro>/include, the libraries have to be specified manually, that means /opt/ros/<distro>/libs/libxxx.so and so on. Maybe you could paste your .pro file here for further help.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-20 04:54:58 -0600

Seen: 1,024 times

Last updated: Apr 20 '16