You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, May 2nd 2008, 5:47pm

A Guide to Install MinGW, Qt4 and Eclipse Integration on Windows XP

It cost me two days to install MinGW, Qt4 and Eclipse Integration on Windows XP, and make debug work. Some people meets problems like Build Debug Libraries cannot make, or "mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1", and so on. So I write this guide, hope it can save some time for you.

1. Download "Automated MinGW Installer" from http://sourceforge.net/project/showfiles.php?group_id=2435, Install it. Notice you should choose g++ and mingw32-make.
2. Download "GNU Source-Level Debugger" from http://sourceforge.net/project/showfiles.php?group_id=2435, decompress it to the directory where you installed MinGW. Please choose no when the decompression software asks you whether to cover the file with the same name.
3. Download "Qt/Windows Open Source Edition" from http://trolltech.com/developer/downloads/qt/windows. Install it.
4. Download "Eclipse IDE for C/C++ Developers" from http://www.eclipse.org/downloads/, decompress it to a directory. If you have already have an eclipse for Java development, you can only install "cdt".
5. Download "Qt Eclipse Integration Downloads" from http://trolltech.com/developer/downloads/qt/eclipse-integration-download, install it.
6. Set your system's Environment Variables. This step is very important. If you miss it, you may meet a lot of problems. E:\Develop is the place where I installed MinGW and Qt to.
Add E:\Develop\MinGW\bin and E:\Develop\Qt\4.3.4\bin to Path,
Add E:\Develop\MinGW\lib and E:\Develop\Qt\4.3.4\lib to Lib (if no Lib, please create one),
Add E:\Develop\MinGW\include and E:\Develop\Qt\4.3.4\include to Include (if no Include, please create one),
Reboot your computer.
7. In Start menu\All Applications\Qt by Trolltech v4.3.4 (OpenSource), please find Qt 4.3.4 (Build Debug Libraries) and execute it. Note that it will take two hours' time and 3GB's free space's on the partition where you installed Qt to.
8. Write your program in Eclipse with Qt.
9. Click the bug icon and select "Open Debug Dialog...", add a new configuration in C/C++ Local Application, notice that C/C++ Application should be "debug/*.exe", not "release/*.exe"! Choose Debug and set Debugger to gdb/mi. And then, you can try to debug.
10. That's all. Hope you will not meet the problems.

Please notice the step 6 is the most important. And you must reboot computer and add these directories to Environment Variables.

I hope this guide will help you.

2

Saturday, May 3rd 2008, 5:43am

RE: A Guide to Install MinGW, Qt4 and Eclipse Integration on Windows XP

If you still meet problem like "gdb: unknown target exception 0xc0000135 at 0x7c964ed1", please add E:\Develop\Qt\4.3.4\lib to Path in your system's Environment Variables.

3

Wednesday, May 7th 2008, 7:15pm

thank you for your practical guide. I have some problems in this case. I am all new to add path and include and so on. Can you tell me what are them and how can I add them in Windows Vista. Maybe you can introduce me a good tutorial or a good book.
again thanks
Ali

4

Thursday, May 8th 2008, 8:31am

I am using Windows XP. Hope this will help you.

Right click "My Computer"->Properties->Advanced->Environment Variables->System variables.

5

Thursday, May 8th 2008, 9:19am

narcis_agh, In Vista you can use:

1º) Windows key + Pause (or mycomputer/properties).
2º) On the left "Advanced system configuration"
3º) "Environment variables" button.

I'm trying to install QT 4.4.0 in Vista with MySql, please shiyu_tang, can you take a look to my thread? http://www.qtforum.org/thread.php?threadid=25002

Thanks

6

Friday, May 9th 2008, 7:40am

Hi,
I have another problem too. I unzipped Eclipse. Then I installed qt-eclipse-integration-win32-1.0.1 . For first time everything work. But after that when I try to open eclipse I just see the first window and eclipse doesnt open.
Anyone knows what's wrong ?

lo_fi_geek

Beginner

Posts: 4

Location: canada

  • Send private message

7

Friday, May 9th 2008, 7:42pm

THANK YOU SO MUCH shiyu_tang!!!!!!

this should probably be stickied

This is the first coherant guide i've read, i don't know why TT doesn't publish something similar.

narcis_agh:
I had a similar problem with eclipse many years ago while working with java. At that point the problem was that i had installed eclipse in a directory that had spaces in it. so...

instead of putting it in C:\Program Files\eclipse

put it in to C:\eclipse

that worked for me way back when, i hope it works for you now!

8

Saturday, May 10th 2008, 7:54am

Hi,
thanks for your attention, but unfortunetly that's not my problem because there is not space in root folders. I have tried c:\eclipse too.
thanks anyway

9

Saturday, May 10th 2008, 3:35pm

Try to delete the file com.trolltech.qtcppstartup_x.x.x.jar (x.x.x is the version) in eclipse/plugins. Maybe this would solve the problem.

10

Sunday, May 11th 2008, 9:44am

Hi,
I did cut/paste that file to another place but it still doesn't work. I think I must forget about eclipse.
thanks
Ali

11

Thursday, July 10th 2008, 6:00pm

Thanks

Thanks a million for this great tutorial...
I am now waiting for my two hours to finish 8)

12

Tuesday, August 5th 2008, 4:28pm

_imp___ZN12QApplicationC1ERiPPci

Hi all,

I have completed the installation of Eclipse Version: 3.4.0 for C++, QT 4 and MinGW on Windows Vista Home premium.
The QT 4.4.0 version I installed is the comercial trial version.

My very first program looks like:

#include <QApplication.h>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
return 0;
}

It doesn't have to do anything but i want to see it compile and link when i build it.
Problem is, i get an error during linking ?(

..../Debug/../src/main.cpp:35: undefined reference to `_imp___ZN12QApplicationC1ERiPPci'
..../Debug/../src/main.cpp:35: undefined reference to `QApplication::~QApplication()'

It's seems, i did something wrong, but what?? I have tried a lot of things but nothing seems to work, I hope someone can help me out.


In the mean time I have downloaded the open source version. Changes some path parameters to the new location and build it. With this version all seems to work without problems. A little bit strange that the open source version works fine and the commerial version does not. 8| I thing i have to stay by this open source version.

This post has been edited 3 times, last edit by "xtrix" (Aug 8th 2008, 4:13pm)


13

Monday, February 22nd 2010, 8:57am

If you still meet problem like "gdb: unknown target exception 0xc0000135 at 0x7c964ed1", please add E:\Develop\Qt\4.3.4\lib to Path in your system's Environment Variables.



I still get the 0xc0000135 exception even though I added C:\Qt\4.6.0\lib to my path.
Eclipse is installed under C:\Program\Eclipse

I am using Windows XP.

Any thoughts?

14

Monday, February 22nd 2010, 12:19pm

I tried to debug the program from a terminal (MSYS) instead.
Doing this I got more information and gdb stated that libSystemCore.dll was not found, (libSystemCore.dll is my own lib), so I guess all paths to any libs must be added to the Path environment variable.
After adding the path to my lib to Path environment variable I could run and debug the program via MSYS. (But for some reason I could not get any output in the terminal, std::cout or printf, but I guess thats due to MSYS??)

Running the program in eclipse does still not work however. It must be some configuration problem.
I have added the include path to the SystemCore.h file in C/C++ Include Paths and Symbols
I have added the path to the lib in C/C++ Project Paths->libraries
And finally I have added
INCLUDEPATH = C:\workspace\OBC\trunk\SystemCore
LIBS += -LC:\workspace\OBC\trunk\SystemCore\Debug -llibSystemCore

to the .pro file.

Any ideas? Have I missed any runtime configurations?