PDA

View Full Version : Qt integration with Eclipse



Dougie1610
29th January 2008, 08:37
Hi there,

I am new to Qt. I have installed Qt with Eclipse. I have also installed the Qt Eclipse integration.
I can create Qt GUI projects and Qt console projects. I can also compile Qt on Eclipse. I have followed all the instructions on the Trolltech web site.

I am doing the AddressBook application on the cheat sheet for Qt on Eclipse. I set up the C/C++ local application. I then run it. It looks like everything works fine, I just don't see AddressBook application running. There is supposed to be an empty window displaying.

Can anyone offer me any advice?

Kind Regards
Dougie1610

Dougie1610
31st January 2008, 08:30
Hi there,

I previously sen't this thread and I received no reply. Please can someone offer me some help?

I have installed Qt with Eclipse. I have also installed the Qt Eclipse integration. I can create Qt GUI projects and Qt console projects. I can also compile Qt on Eclipse. I have followed all the instructions on the Trolltech web site.

I am doing the AddressBook application on the cheat sheet for Qt on Eclipse. I set up the C/C++ local application. I then run it. It looks like everything works fine, I just don't see AddressBook application running. There is supposed to be an empty window displaying.

Thanks

Cheers

marcel
31st January 2008, 08:33
Please don't post the same question multiple times.
See if the application actually compiled. Look in debug or release for the application executable.

sliawati
22nd March 2008, 10:59
my system:
* Vista Home
* qt-win-opensource-4.3.4-mingw.exe
* eclipse-cpp-europa-winter-win32
*qt-eclipse-integration-win32-1.0.1.exe
* mingw 3.1.4

I have edit
Edit C:\Qt\4.3.3\bin\qtvars.bat
and add this line:
set PATH=%PATH%;C:\MinGW\libexec\gcc\mingw32\3.4.5

I am trying to follow cheat sheet to build AddressBook App.

My problem is:
Severity and Description Path Resource Location Creation Time Id
Invalid project path: Include path not found (C:\Qt\4.3.4\include\ActiveQt). BookAddress pathentry 1206182303052 19

As I understand ActiveQt is for QT3, but I did not check QT3 Support, since I work with Qt 4.3.4.

I also got 100 of 1281 items ERROR: :confused:
Severity and Description Path Resource Location Creation Time Id
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.2/bits/allocator.h `ptrdiff_t' does not name a type BookAddress line 64 1206182319417 349

Please help me. Thanks in advance for your help and assistance.

best regards,
suryadi

sliawati
22nd March 2008, 15:44
I try to uninstall qt-win-opensource-4.3.4-mingw, qt-eclipse-integration, then reinstall with option MingW download from Trolltech checked.
It solve my compiling errors. But still give me 1 warning about ActiveQt. How to remove ActiveQt option?

When I try to run: AddressBook, the error message is like this:
AddressBook.exe has stopped running.
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available. --> Close Program button.

Please help me. TIA.

best regards,
suryadi

mica
1st April 2008, 09:05
Hi,
I have recently installed Qt 4.3.4 and Qt integration for Eclipse and I encountered several problems like the one in this post.
I am working on Windows Vista Ultimate Edition.
There is no answer on Qt integration for Eclipse on Vista in this forum but I try to post my problems anyway.
I have installed qt-win-opensource-4.3.4-mingw.exe and selected MinGW download.
Qt and MinGW have been installed in C:\Qt\4.3.4\ and C:\MinGW respectively.
I have edited C:\Qt\4.3.4\bin\qtvars.bat to add:
set PATH=%PATH%;C:\MinGW\libexec\gcc\mingw32\3.4.2

I have also installed mingw-utils and mingw-debugger.

To configure and build Qt I have opened the Qt command prompt.
If I just run “configure” and then “mingw32-make” the compilation is done successfully.

But I have the following problems:
1) When I use “configure –debug-and-release –qt-libjpeg –qt-libtiff –qt-libpng” the configure command completes with no error and then I run “mingw32-make”.
After around an hour of compilation I have a compilation error telling that an argument is invalid.
If I run the mingw32-make command in the libjpeg project directory is compilation is done with no error.
I tried several times reinstalling Qt and MinGW and after several hours of installationg/configure/build I hope there is somebody here that can help.
Is there something to do before changing configure configuration to set libjpeg/tiff and png?

2) After rebuilding successfully Qt using “configure && mingw32-make” I am not able to build a Qt console application generated by Qt integration for Eclipse.
I have installed Eclipse and Qt integration for Eclipse the used version are:
eclipse-cpp-europa-winter-win32
qt-eclipse-integration-win32-1.0.1.exe

To create the console application I have followed the steps:
- Run Eclipse using Qt integration link for running Eclipse with mingw.
- Create new Qt console project keeping all default settings.
- Eclipse notifies that project must be configured with Qt bin and MinGW paths. I have entered the requested paths and have entered Qt4.3.4 for Qt version name.
- Eclipse automatically builds the project and gives a warning telling that c:\Qt\4.3.4\include\ActiveQt is not found.
- I have modified the poject include settings to remove ActiveQt path from the list.
- The project builds with no warning an no error but when I run the built application I have an error.
- Nothing happens when I try to run the console application in Qt command prompt.

Is there somebody that can tell how Qt integration for Eclipse must be used with Qt 4.3.4?
Is there a Qt configure option to be used before? If yes could you explain how to use it to not have a build error under Windows Vista (as my problem 1) is a build error when I change configure options)?

Thank you in advance for your help

sliawati
1st April 2008, 09:17
my problem is the same with you (Mica) and solved by download and installing CDT 4.0.3
February 26, 2008 - As part of the Europa Winter Maintenance release, CDT 4.0.3 includes numerous fixes to CDT 4.0.2.
To download cdt, please visit our Downloads page on the left and choose CDT 4.0.3
http://www.eclipse.org/cdt/
extract it at eclipse directory.

i did not reconfigure anything. it works.

About ActiveQTm it is from QT ver 3 thing, even the compiler just gives the warning, the program AddressBook runs well.

hope this information help you.

how to modified the poject include settings to remove ActiveQt path from the list?

thanks.

best regards,
suryadi

mica
1st April 2008, 18:44
Thank you Sliawati for your quick reply, il will update to CDT 4.0.3.

Upon your question to remove the ActiveQt from the project include list do the following:
- Right click on the project directory in projects explorer or open "Project" menu and select "Properties".
- In the opened dialog select "C/C++ Include Paths and Symbols" at the left of the dialog.
- At the right you will have the list of includes just select the ActiveQt line and the "Remove" button.
After that the warning disapear on my Eclipse.
Regards
---
Mica

mica
2nd April 2008, 23:37
Hi,
I have an other question upon Qt integration for Eclipse.
I can create, build and execute Qt console and GUI applications in release build but I am not able to run the debug build binary (I have updated Eclipse to CDT 4.0.3).
To build in debug I have configured Qt 4.3.4 with command "configure -debug-and-release"
and build with mingw32-make.
When the Qt project is built under Eclipse the 2 binaries are created but only the release version can be run.

When I run the debug version I have the following error:
"gdb: unknown target exception 0xc0000135 at 0x77598fc7
You can't do that without a process to debug."

Could somebody tell how to use the MinGW gdb debugger under Eclipse (running on Vista) to run applications with breakpoints enabled (with qDebug nothing is written on the "Console" window when a GUI application is run).

Thanks and best regards.