PDA

View Full Version : Questions regarding the installation mechanics



NewGuy
10th June 2006, 13:58
I've recently started programming in C++, and now I've decided to expand my knowledge to include some graphical frameworks. I am quite confused about some of the steps in installing and using Qt though.
I am using Visual Studio 2005 IDE and I've followed this excellent guide: http://www.telldus.se/qt/tutorial.pdf
I am curious why at has to be so complicated to install the open source version of Qt. Usually when you install something it's only a matter of placing the program and then everything is handled automatically.

How come I have to type configure in the Qt command prompt? What is the function of this command? Every time I type configure in C:\Qt\4.1.1 in the windows command prompt I receive an error, but if I do it in the Qt command prompt everything works fine. How come?

What is the difference between the mingw32-make and NMake?

Why do I have to run configure before I run make? Why is it not a single process?

wysota
10th June 2006, 14:16
Usually when you install something it's only a matter of placing the program and then everything is handled automatically.
Yes, if the program is provided in binary form.


How come I have to type configure in the Qt command prompt?
Because you downloaded the source version of the framework. If you chose the one with minGw bundled, you'd end up with an installer and pressing "next", "next", "next", etc.


What is the function of this command?
It prepares the library compilation process by generating appropriate compilation scripts which suit your system and options you chose for the compilation.


Every time I type configure in C:\Qt\4.1.1 in the windows command prompt I receive an error, but if I do it in the Qt command prompt everything works fine. How come?
Because "Qt command prompt" sets additional environment variables which are required by the compilation process. If you added those variables to your default system env vars, you could use the "regular" prompt. But the way it is your system is kept clean.


What is the difference between the mingw32-make and NMake?
NMake is a microsoft clone of the GNU Make tool, mingw32-make is a MinGW port of GNU Make. GNU Make is superior to NMake, but it's not supported by Microsoft. With MinGW you'll have to use Make and not NMake.


Why do I have to run configure before I run make? Why is it not a single process?
You only have to run configure if you want to modify the setup of compilation, for example if you want to compile with different options (passing different switches to configure -- try running "configure -help"), whereas make is run to do the actual compilation. I understand that when you are new to the system it might sound a little odd to you, but believe me that it has significant advantages. The whole unix world uses more or less the same approach.

NewGuy
12th June 2006, 17:03
I am getting this error when I try to compile the example program in the guide:
Performing Makefile project actions
'mingw32-make' wasn't recognized as an internal or external command, a program or a batchfile.
Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'.

Is it because Visual Studio can't find the MinGW compiler?

wysota
12th June 2006, 18:50
Is it because Visual Studio can't find the MinGW compiler?

Not the compiler but its "make" tool, but generally -- yes. You should make sure your MinGW installation bin directory is in your system %PATH% (that's exactly what "Qt prompt" does).

Brandybuck
13th June 2006, 01:34
NMake is a microsoft clone of the GNU Make tool
Actually, it's just Microsoft's make. The make utility was around long before GNU showed up. Microsoft's has a somewhat untraditional syntax, but on the other hand, so does GNU's.:D Unfortunately, the POSIX standard for make is quite weak.

wysota
13th June 2006, 02:05
Actually, it's just Microsoft's make. The make utility was around long before GNU showed up. Microsoft's has a somewhat untraditional syntax, but on the other hand, so does GNU's.:D Unfortunately, the POSIX standard for make is quite weak.

But the fact that Microsoft stole the idea of make from the Unix world (with GNU make being now the most popular representative) remains.

jacek
13th June 2006, 02:16
But the fact that Microsoft stole the idea of make from the Unix world (with GNU make being now the most popular representative) remains.
They even stole the idea of C compiler! ;)

wysota
13th June 2006, 11:11
They even stole the idea of C compiler! ;)

Wow! They have a C compiler too? Maaan.... So that's probably why WinAPI is written in C! They just had to compile something with their brand new superb hypersonic indestructible optimal superscalar C compiler!

NewGuy
14th June 2006, 14:32
Not the compiler but its "make" tool, but generally -- yes. You should make sure your MinGW installation bin directory is in your system %PATH% (that's exactly what "Qt prompt" does).


When I open the Qt command prompt and type path it says
PATH =C:\Qt\4.1.1\bin;C:\MinGW\bin;C:\WINDOWS\System32
I assume this is correct but I still get that compile error.

fullmetalcoder
14th June 2006, 16:00
Wow! They have a C compiler too? Maaan.... So that's probably why WinAPI is written in C! They just had to compile something with their brand new superb hypersonic indestructible optimal superscalar C compiler!
lol! Yeah they had to so they wrote a brand old miserable undersonic destructible minimal underscalar operating system...:D And the worse thing in this story is that the OS in question managed to oppress lots of honest people for years and has not yet lost is throne... Maybe it's only my french blood speaking but I think there's a need for some riots!;)

wysota
14th June 2006, 16:43
When I open the Qt command prompt and type path it says
PATH =C:\Qt\4.1.1\bin;C:\MinGW\bin;C:\WINDOWS\System32
I assume this is correct but I still get that compile error.

It doesn't have to be correct. Check if C:\MinGW\bin contains mingw32-make. Did you install mingw32-make at all?

NewGuy
14th June 2006, 19:02
The folder does contain minGW32-make. After having a closer look it's not the exact same error:

'make' wasn't recognized as an internal or external command, a program or a batchfile.
Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

It seems Visual Studio can't find "make" - that file isn't in the MinGW32\bin folder.

Why does it have to be so difficult and confusing to integrate the Visual Studio IDE with Qt?

wysota
14th June 2006, 19:25
You have to call "mingw32-make" and not "make". Everywhere where there is a reference to "make" in the tutorial you should place "mingw32-make". Alternatively you can rename "mingw32-make" to "make", but I don't know if it won't break anything.

NewGuy
14th June 2006, 20:10
Still doesn't work. Can you point me to a step by step guide?

wysota
14th June 2006, 20:12
Still doesn't work. Can you point me to a step by step guide?

I don't know any. What's wrong with the one you use?

NewGuy
14th June 2006, 20:22
I still get the "'mingw32-make' wasn't recognized as an internal or external command, a program or a batchfile." error. I followed each step in the tutorial but it doesn't really help much. I am not sure how my install differ from his - as I said I did excactly as written

Is it really required to compile with MinGW everytime? Can't I just as well use the default Visual Studio NMake?

wysota
14th June 2006, 20:42
I still get the "'mingw32-make' wasn't recognized as an internal or external command, a program or a batchfile." error. I followed each step in the tutorial but it doesn't really help much. I am not sure how my install differ from his - as I said I did excactly as written
Does this also happen if you call mingw32-make from the "Qt prompt"? Does it work if you call it with full path (C:\MinGW\bin\mingw32-make)?


Is it really required to compile with MinGW everytime?
Yes, unless you buy a commercial license for Qt.

Can't I just as well use the default Visual Studio NMake?
No, it's not supported by the Free version.


Anyway, do you really need to integrate with VS? Just use Visual Studio to edit the code and them compile using the command line (remember to use the "Qt prompt").

fullmetalcoder
15th June 2006, 10:29
I still get the "'mingw32-make' wasn't recognized as an internal or external command, a program or a batchfile." error. I followed each step in the tutorial but it doesn't really help much. I am not sure how my install differ from his - as I said I did excactly as written

Is it really required to compile with MinGW everytime? Can't I just as well use the default Visual Studio NMake?
I don't know Vi$ual $tudio very well but some IDEs require names of the following form to correctly run an external program : "DRIVE:\full\path\to\program\program.exe" ...