0
$\begingroup$

Rosanswers logo

Hello. I'm having trouble trying to use Qt for my ROS projects.

First I tried with standard Qt from official webpage, running it from terminal and with some path configurations I managed to make autocomplete work (only in c++ files) but not in include files and also no building was possible because I got some errors as "undefined reference to std::__cxx" from g++ compiler.

Then, I removed Qt and installed ros qt pluguin following this tutorial: link

Now I have qtcreator-ros but I can only launch it from desktop app. When I try to run it from terminal, I get a core dump:

image description

edit: I realized that using sudo solves the issue.

Anyway, I run it from applications, I can create a workspace where I select my catkin_ws.

I try to build I get this catkin_make error:

16:37:49: Running steps for project catkin_ws... 16:37:49: Could not start process "catkin_make" --cmake-args -G 'CodeBlocks - Unix Makefiles' Error while building/deploying project catkin_ws (kit: Imported Kit) When executing step "CatkinMake Step" 16:37:50: Elapsed time: 00:01.

So I check my kits and there is something weird...

image description image description

My kits are not well configured, and I don't know what should I do. It's supposed to be configured automatically, and I don't know where the error is.

Any idea?

Thank you


Originally posted by RogerPi on ROS Answers with karma: 36 on 2018-01-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Finally I managed to solve it!!

The first problem is solved running it using sudo, I suppose is because the program is in opt and some permissions might be unset.

To solve Kits problems I reinstalled qt several times, until I realized that the configuration was always the same, so I deleted ~/.config/QtProject folder. I assume that having different Qt, installing, un-installing, maybe I touched something I shouldn't.

When I deleted configuration and run it again, there was only 1 kit and everything is set up properly. But building made the same error:

16:37:49: Running steps for project catkin_ws... 16:37:49: Could not start process "catkin_make" --cmake-args -G 'CodeBlocks - Unix Makefiles' Error while building/deploying project catkin_ws (kit: Imported Kit) When executing step "CatkinMake Step" 16:37:50: Elapsed time: 00:01.

To solve this, just go to your workspace and run manually "catkin_make --cmake-args -G 'CodeBlocks - Unix Makefiles' "

After doing it for first time, you will be able to do it using Qt.

I just figured out these things trying and trying, but I don't have a clear idea of what's going on. So if anybody has any comment on this, it will be welcome!


Originally posted by RogerPi with karma: 36 on 2018-01-23

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by gvdhoorn on 2018-01-23:\

The first problem is solved running it using sudo, [..]

I'm happy for you that you got things to work, but never run programs as root (which is what sudo sort of does) unless it's absolutely, really, necessary. It'll just complicate things later on, and should not be necessary at all ..

Comment by RogerPi on 2018-01-23:
No, I'm not running it as root, it was just for testing, but I know I can screw something in my computer easily. But I still don't understand why I can't run it from terminal, but I can by desktop application...

Comment by gvdhoorn on 2018-01-23:
.. to run something as simple as Qt Creator.

The fact that it doesn't work without sudo points to issues with how your OS is setup, which would be something to check.

Google-searching for "qt platform plugin xcb" returns a host of results.

Comment by Levi-Armstrong on 2018-01-24:
After you ran "catkin_make --cmake-args -G 'CodeBlocks - Unix Makefiles' " were you able to build from within Qt Creator?

Comment by RogerPi on 2018-01-25:
Yes, after doing it for first time in terminal I can build from terminal or Qt with no problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.