PDA

View Full Version : Qt4 + Eclipse problems



Bug80
29th May 2008, 09:34
I have problems integrating Qt4 in Eclipse (on Windows).

Qt4 installed fine, and I am able to compile a test project using qmake + make. This all works fine.

I followed the steps on How to use Eclipse with QT4 in 10 steps (http://www.qtcentre.org/forum/f-installation-5/t-howto-use-eclipse-with-qt4-in-10-steps-5383.html).

So, I end up with 2 'custom' build targets for my project: "all" and "qmake". "qmake" is defined as (just like in the tutorial):

Target name: qmake
Make target: test.pro
Build command: qmake

However, when I double-click "qmake" Eclipse does not execute qmake, but the internal builder instead.. and of course this results in errors. I just cannot let Eclipse to use the external tool "qmake" I defined. Unticking the box "Run all project builders" in the make target dialog does not help.

What am I doing wrong? :(


Versions:
QT 4.4.0
Eclipse 3.3.2

mcosta
29th May 2008, 10:30
If you want use Eclipse, use the Qt Eclipse Integration plugin released by Trolltech

http://trolltech.com/developer/downloads/qt/eclipse-integration-download

Bug80
29th May 2008, 10:32
Ok, it works now.

Turns out I had to start a "C++ project --> Makefile project" (apparently in previous versions of Eclipse you could start a new "C/C++ Makefile project" directly, like described in the tutorial).

I now have a different problem though. I can compile Debug versions of QT4 projects without problems, but when I try to execute a compiled Release I get the following error:

"The procedure enty point _Z5qFreePv could not be located in the dynamic link library QtCore4.dll"

Any ideas? I compiled Qt4 manually using "configure + make".

lyuts
29th May 2008, 13:54
Ok, it works now.

Turns out I had to start a "C++ project --> Makefile project" (apparently in previous versions of Eclipse you could start a new "C/C++ Makefile project" directly, like described in the tutorial).

I now have a different problem though. I can compile Debug versions of QT4 projects without problems, but when I try to execute a compiled Release I get the following error:

"The procedure enty point _Z5qFreePv could not be located in the dynamic link library QtCore4.dll"

Any ideas? I compiled Qt4 manually using "configure + make".

Is Qt's bin directory in your PATH variable?

Bug80
29th May 2008, 14:12
Is Qt's bin directory in your PATH variable?
Yes, it is.

I just re-compiled Qt using the installation package (.exe), and now it works. :)

I can think of two possible reasons for this:

1) The installation package warned that my MinGW version is too new, which may lead to problems. Therefore I let the installer download the proper (older) MinGW.

2) It turned out I have some other versions of QtCore4.dll, for example in the MikTeX\bin directory, which was *also* in my PATH. This time I've put the path to Qt\bin in front of all the other directories in the PATH string, so that the correct dll will be found first.

I think one of these two options solved my problem.

lyuts
30th May 2008, 09:16
Bug80, what version you MinGW did you use for the first time?

Bug80
30th May 2008, 16:13
Bug80, what version you MinGW did you use for the first time?
The latest version (5.1.4). I believe this comes with GCC 3.4.5

I don't know which version of MinGW comes with Qt (any ideas as to how to find that out?). The GCC version is 3.4.2.

I remember the installer of Qt complaining about an incorrect version of w32_api.h with the newer GCC version.