PDA

View Full Version : Installing Qt 4.1 (open source) on Windows XP



katrina
9th January 2006, 01:29
So I was installing Qt 4.1 (open source) on my Windows XP computer at work and saw that it only worked with the MinGW compiler, so I said ok no problem and went looking for it only to find a mess of various tgz packages that were options. I tried finding a "windows installer" version, which I finally did, but it didn't have whatever options it needed to compile qt4 :-(
So I gave up and started playing BZ Flag instead ;-)

Back in the "old days" I would have just said "ok, so I will sort through all these packages and install what I need" but I am lazy about that stuff these days (thanks apt-get and rpm)

So what I am saying is that if anyone is looking for a project it would be nice to make a windows installer that downloads and installs both qt4.1 and mingw in a working form with minimal user effort. a lot of noobies and lazy folks like myself would be forever grateful ;-) lol

:-)

Katrina

jacek
9th January 2006, 01:38
it would be nice to make a windows installer that downloads and installs both qt4.1 and mingw in a working form with minimal user effort.
You mean something like qt-win-opensource-4.1.0-mingw.exe file that you can find on Trolltech's server?

katrina
9th January 2006, 02:41
probably LOL I haven't seen that!

(although I haven't looked since, like, the day after 4.1 was officially released)

thanks! :-)

Katrina

Reenen
8th February 2006, 08:38
I downloaded that file. And I am stuck. But I am a total n00b to Qt, and you might've been able to work with the .exe file.

But it's saying it need mingwm10.dll. :(

Kapil
8th February 2006, 09:20
Hi katrina,

I also faced lot many problems while installing QT n making it run..

As far with my small experience in it what i can say is that, u first install MinGW on ur system. After u r done with it start installing with QT. There comes a dialog box where it asks that have u installed MinGW or want to install from net. So if u haev installed it earlier continue by saying installed in C:\MinGW folder.

This will install QT on ur system.

Then run the "configure -debug && make" from command prompt going to the QT directory or from the QT command prompt provided in the start menu.

When it is done, u are ready to write programs, compile them and run them.

Enjoy QT,

Kapil

Reenen
8th February 2006, 10:24
Thanks... I installed CodeBlocks, and it installed mingw without too much effort. :)

So, my QT installation files are:
QT.exe file (44mb the name says it's got mingw, but it doesn't install it, so I dunno if it's there)
CodeBlocks.exe (13mb)

voidvoidpointer
15th February 2006, 01:24
I installed the open source version of Qt 4.1.0 on two Windows 2000 boxes with Service Pack 4, and neither installation was perfect.

Both Windows 2000 boxes have Cygwin, which I refreshed just before trying to install Qt. I did that because MinGW is part of Cygwin, and I thought that would be sufficient, but that didn't work. I was able to compile tutorial t1, but I was NOT able to link it because some MinGW libraries are missing from Cygwin.

Next, I downloaded one .exe file and several tar.gz and tar.bz2 file from mingw.org. Without Cygwin's tar and bzip2, I would not have been able to install MinGW from those files. Just for the record, Cygwin's installation is flawless and painless.

After I installed a complete MinGW environment, I installed Qt, but the installation did NOT go smoothly. The first complaint was that the Qt installer was UNABLE to detect that MinGW WAS installed in the very same directory that it sought: C:\MinGW!

The installer warned me that my installation might not work if I continued, but I knew that I had installed MinGW in the right place and continued. Dogged perseverance and repetition ad nauseam paid off.

I am not fond of the Windows 2000 CMD command line and prefer to use the Cygwin POSIX environment; so, I defined QTDIR and QMAKESPEC, set MINGW_IN_SHELL=1 to convince qmake when I run it from Cygwin that I have a full MinGW environment, and added $QTDIR/bin to my Cygwin shell's PATH.

With that, I was able to compile tutorial/t1, but I wasn't able to link it until I modified $QTDIR/mkspecs/win32-g++/qmake.conf because qmake builds Makefiles that can't link binaries or executables.

What did I add to qmake.conf?

I changed the line that reads
QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
to
QMAKE_LIBS_QT_ENTRY = -L"C:/MinGW/lib" -lmingw32 -lqtmain

After that, I was able to compile and link successfully.

On both Windows 2000 boxes, the files $QTDIR/lib/*.prl are installed with the file mode 700 and a group name of ????????!

On one computer where I installed Qt, I am not an administrator, but as an end user I can install anything, but on the other box, I am an unprivileged user who must ask an administrator to install software.

I didn't have a problem using Qt on the first computer, but I couldn't use Qt on the second computer until I repaired the file modes which caused the problem.

A file mode of 700 for all those *.prl files is WRONG because compilations fail when the compiler tries to open those files when the compiler is run by an end user who is not the owner of those files. All end users fall under the category of other and have no access to any of those files which means that compilations will fail!

Fortunately, it's very easy to fix that problem. Use Cygwin to chmod go+rx *.prl those files back into legible files for all users who fall under the categories of group and other. It may even be sufficient to use chmod go+r *.prl, but I didn't try that.

I don't have a clue about how to submit changes to improve the installation process on Windows 2000 for those who will come after me besides sounding off as I have just done.

jacek
15th February 2006, 01:39
I don't have a clue about how to submit changes to improve the installation process on Windows 2000 for those who will come after me besides sounding off as I have just done.
I think most of these problems might be caused by presence of Cygwin or MSys. Anyway you could contact the Trolls and tell them about your fixes.

dimitri
19th February 2006, 13:26
I installed the open source version of Qt 4.1.0 on two Windows 2000 boxes with Service Pack 4, and neither installation was perfect.

Both Windows 2000 boxes have Cygwin, which I refreshed just before trying to install Qt. I did that because MinGW is part of Cygwin...

MinGW is not really part of Cygwin.

The problem is that you have Cygwin or MSYS installed. These put sh.exe in you PATH. GNU's make will chose sh.exe instead of Windows' standard shell. Unfortunately sh.exe doesn't understand Windows-style paths.

Qt does not support building from a Cygwin or MSYS shell.