Results 1 to 8 of 8

Thread: Loaded QT 4.1.1 and MinGW Compiler

  1. #1
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Loaded QT 4.1.1 and MinGW Compiler

    Totally green and stuck

    Loaded QT 4.1.1 and MinGW Compiler from the new book "C++ GUI Programming with QT 4". The QT and MinGW installation went smoothly.

    Opened up the QT 4.1.1 Command Prompt (which comes with the QT installation) which automatically sets the enviromental variables, (see attachment)

    In my attemp to run the good old Hello QT program from the book. I used the books Hello QT code then I ran the qmake -project, qmake hello.cpp, and make, and that went smoothly.

    Then I tried to run the program by typing hello into the command line and I get the following'hello' is not recognized as an internal or external command, operable program or batch file"

    Could it be automatic enviromental variable settings?

    Anybody have any ideas?

    Thanks in advance!
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Loaded QT 4.1.1 and MinGW Compiler

    Is your current folder same as where hello.exe is?

  3. #3
    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: Loaded QT 4.1.1 and MinGW Compiler

    Either the program location has to be in your path, or you need to run it from its location, or you need to double click on its executable from the file manager. In that regard it's no different from any other program.

  4. #4
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Loaded QT 4.1.1 and MinGW Compiler

    Okay, attached is my current folder structure.

    Is your current folder same as where hello.exe is?
    Here is a green question. I am not seeing the executable that should have been generated.

    Should I be seeing an hello.exe in my hello folder? How is the .exe generated?
    Attached Images Attached Images

  5. #5
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Loaded QT 4.1.1 and MinGW Compiler

    It will either be in your debug or release folder. Just double click the exe

  6. #6
    Join Date
    Jul 2006
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Loaded QT 4.1.1 and MinGW Compiler

    Munna,
    Quote Originally Posted by munna
    It will either be in your debug or release folder. Just double click the exe
    Thanks! A double click and Hello QT dialog box popped up.

    I thought from the command line I could run the program? That's how its described in the new QT book instead I got 'hello' is not recognized as... . Any thoughts?


    Anyway, thanks for the help!

  7. #7
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Loaded QT 4.1.1 and MinGW Compiler

    You can do that by 2 ways

    1. Go to the folder where the exe is i.e., cd debug (in the command prompt) and then hello.
    2. In your .pro file change the settings so that the exe is created in the current folder itself and not in the debug or release folder.

    I would suggest you the first option.

  8. The following user says thank you to munna for this useful post:

    Seth (8th July 2006)

  9. #8
    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: Loaded QT 4.1.1 and MinGW Compiler

    Quote Originally Posted by Seth
    I thought from the command line I could run the program? That's how its described in the new QT book instead I got 'hello' is not recognized as... . Any thoughts?
    "hello" is not recognized as an executable because the command line current directory isn't the same as the directory in which your program is located... There are two ways to run your program from command line :
    Qt Code:
    1. cd release
    2. hello
    To copy to clipboard, switch view to plain text mode 
    or :
    Qt Code:
    1. release\hello
    To copy to clipboard, switch view to plain text mode 

    BTW QT means Quick Time... I suppose you're referring to Qt...
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. How to setup the Dev C++ with MingW compiler for QT?
    By gopik_g in forum Installation and Deployment
    Replies: 1
    Last Post: 4th June 2006, 08:19

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.