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

Qmake and ROS project

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

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

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

First answer (ignore if you are bound to qmake): Don't use qmake. Qt works pretty good with CMake, see and .

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/ and so on. Maybe you could paste your .pro file here for further help.

edit flag offensive delete link more

Question Tools

1 follower


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

Seen: 995 times

Last updated: Apr 20 '16