PDA

View Full Version : Qt Eclipse plugin - linking problem of external libraries



rastaxe
17th February 2010, 13:25
Hi, I'm using Eclipse CDT with Qt plugin. It works well, but I have problems when I want to link external libraries. If I create a standard C++ project, I don't have any problems, but with a Qt Gui Project I don't understand where to add libraries to the linker, because the "Property" page is different.
Just for now, I have to manually add my libs editing the Makefile.Debug every time.
It should be a way to do this with Eclipse.
Could anyone help me?

axeljaeger
17th February 2010, 15:22
There has to be a way to edit the .PRO-file of your Qt Project, either graphically or just a text editor.

In the pro-file, add your lib to the LIBS-variable of the project file. You can have -L<library-path> and -l<library>-statements there

rastaxe
18th February 2010, 09:20
Thanks! I have edit manually the pro file with LIBS+= -l<library> and now it works.
Thank you very much!

furious_mushroom
22nd May 2011, 12:51
There has to be a way to edit the .PRO-file of your Qt Project, either graphically or just a text editor.

In the pro-file, add your lib to the LIBS-variable of the project file. You can have -L<library-path> and -l<library>-statements there

This thread is 5th google result for "eclipse cdt qt gui add library"

Where should I open a bug / feature request about this?

Because obviously creating Qt applications in eclipse and not being able to add an external library ( every application has those, apart from Hello World examples maybe! ) without having to edit .pro file manually sort of sucks.

Maybe I`m acting stupid and not seeing anything obvious, any hints are welcome.

SixDegrees
22nd May 2011, 13:36
This thread is 5th google result for "eclipse cdt qt gui add library"

Where should I open a bug / feature request about this?

Because obviously creating Qt applications in eclipse and not being able to add an external library ( every application has those, apart from Hello World examples maybe! ) without having to edit .pro file manually sort of sucks.

Maybe I`m acting stupid and not seeing anything obvious, any hints are welcome.

This is a serious problem with Eclipse - they leave users incapable of solving the simplest of problems by making them dependent on a tool that doesn't bother to document itself or the components it attempts to rope together. I have a strong hunch that 'the "Property" page is different' means 'I didn't make the time to learn about it,' and now that is somehow the tool's fault.