Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Attempting to debug Qt gui app with Eclipse(installing the Qt development tools for Eclipse)
Attempting to debug Qt gui app with Eclipse [message #1794048] Wed, 22 August 2018 20:06 Go to next message
Robert Murch is currently offline Robert MurchFriend
Messages: 13
Registered: August 2018
Junior Member
How do I go about installing the Qt development tools for:

Eclipse IDE for C/C++ Developers

Version: Photon Release (4.8.0)
Build id: 20180619-1200

I have Qt-4.7.2 and I am running on Ubuntu 16.04

I took a look at https://www.eclipse.org/forums/index.php/t/210624/

So when I go to Help:Install New Software... here I select --All Available Sites-- and I don't see anything about Qt in the resulting list population.
Re: Attempting to debug Qt gui app with Eclipse [message #1794249 is a reply to message #1794048] Tue, 28 August 2018 05:04 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You need to treat it as a third party library.

There are a number of ways to do this -- too many to enumerate.
There is no 'best' way as 'best' depends on your needs.

In general, you need to change the compiler settings if you are using a managed build.
Alternatives to a managed build (i.e., Eclipse creates the makefile) could be Autotools or writing your own makefile.
With managed builds, you may be able to get away with inserting an execution of pkg-config in your compile command line:
Under Project --> Properties --> C/C++ Build --> Settings --> Tool Settings tab --> <compiler> --> Miscellaneous
Add as other flags `pkg-config --cflags opencv` (Note the back ticks)
replace opencv with the name of your Qt package.
If that can't be done, you'll need to add the proper paths to the Includes settings dialog for the compiler.

You also need to tell the linker what libraries to use.
Again you may be able to set misc. linker flags with `pkg-config --libs opencv`
Otherwise, use Project --> Properties --> C/C++ Build --> Settings --> GCC C++ Linker --> Libraries

And you need to tell the Indexer where the library includes reside (assuming they aren't in /usr/include somewhere).
Use
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entrues --> CDT User Settings Entries
to set the paths to the includes.

It's also possible to alternately use Project --> Properties --> C/C++ General --> Paths and Symbols

Just keep in mind that Eclipse is a text editor with the ability to call external programs such as Make which in turn calls the compiler and linker.

Debugging GUI programs is tricky because they are generally reactive to user inputs and you can only step through small portions of them.

[Updated on: Thu, 30 August 2018 21:38]

Report message to a moderator

Previous Topic:GCC extension types
Next Topic:How to add a tool that doesn't have an output?
Goto Forum:
  


Current Time: Thu Apr 25 14:55:55 GMT 2024

Powered by FUDForum. Page generated in 0.03478 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top