Results 1 to 18 of 18

Thread: Questions regarding the installation mechanics

  1. #1
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Questions regarding the installation mechanics

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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.

  3. The following 2 users say thank you to wysota for this useful post:

    grzywacz (11th June 2006), NewGuy (11th June 2006)

  4. #3
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Questions regarding the installation mechanics

    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?

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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).

  6. #5
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by wysota
    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. Unfortunately, the POSIX standard for make is quite weak.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by Brandybuck
    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. 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.

  8. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by wysota
    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!

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by jacek
    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!

  10. #9
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by wysota
    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.

  11. #10
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by wysota
    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... 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!
    Current Qt projects : QCodeEdit, RotiDeCode

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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?

  13. #12
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Questions regarding the installation mechanics

    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?

  14. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    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.

  15. #14
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Questions regarding the installation mechanics

    Still doesn't work. Can you point me to a step by step guide?

  16. #15
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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?

  17. #16
    Join Date
    Jun 2006
    Posts
    19
    Thanks
    4
    Qt products
    Qt4

    Default Re: Questions regarding the installation mechanics

    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?

  18. #17
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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").

  19. The following user says thank you to wysota for this useful post:

    NewGuy (16th June 2006)

  20. #18
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Questions regarding the installation mechanics

    Quote Originally Posted by NewGuy
    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" ...
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. 2 Questions about layouts
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2006, 13:54
  2. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.