Results 1 to 20 of 21

Thread: "mainwindows" Example

Hybrid View

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

    Default "mainwindows" Example

    Hi All,

    trying to run the "mainwindows" example that came with Qt 4.2.3

    These complied okay
    qmake -project
    qmake mainwindows.pro

    Choked when I ran
    make

    Shouldn't I be able to just run this program strait from its folder?

    What file can I attach to show you the errors?

    Thanks in advance

  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: "mainwindows" Example

    What do you mean by "choked"? And why did you run "qmake -project"? Didn't the example already have a project file?

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

    Default Re: "mainwindows" Example

    Wysota, Yes, the example did have the -project file already in the folder. I ran it because thats how I did the tutorial examples, "hello", etc...

    Did I cause a mishap by re-running"qmake -project"?

    Choked I mean, the command prompt had like 100's of lines of gibberish. No .exe showed up in the DEBUG folder.

    Is there a "log" somewhere so I can attach to show you the 100's of lines of gibberish.

    Using the word "gibberish" because I dont know what all the lines mean on the command prompt.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    You can attach a file to your post...
    It's the "Manage attachements" button below...

    Regards

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

    Default Re: "mainwindows" Example

    Marcel, thanks but how do I pull (copy/paste) the data from the command prompt?

    Is there some sort of "log" file that is generated that shows all the data (text) from the command prompt when "make" is executed?

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    Yes, actually...
    When running qmake to compile th example do this:

    qmake ... > qmake_output.txt

    EDIT: "..." stands for the actual options that you would give to qmake

    This will generate the file qmake_output.txt in the same folder. It means it will direction the console output to a file.
    You can attach that.
    Last edited by marcel; 15th April 2007 at 02:55.

  7. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    Also, qmake hast the "-o file" option. The output will be written to the file you specify .

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

    Default Re: "mainwindows" Example

    Marcel,

    Iteresting, I just ran "qmake" instead of "make" and didnt get any errors or gibberish.

    However, in the DEBUG file there is no .exe file to launch the program. The DEBUG file is empty.

    How do we launch a program? Shouldnt there be a .exe file somewhere?

    No where in the "mainwindows" folder was a file generated called "qmake_output.txt"

    Attached is a qmake file, dont know if you can use it for debugging

    Thanks in advance

  9. #9
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    Were you using make? Not good...qmake projects are not compatible with normal makefiles.
    Check the Release folder for the executable...

  10. #10
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    The release folder in every folder in the mainwindows example...

    regards

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

    Default Re: "mainwindows" Example

    The RELEASE folder is empty as well.

    Why cant I use "make"? I used it for the "hello" program and such.

  12. #12
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: "mainwindows" Example

    If you want debugging information. add CONFIG += qt debug.
    to use the plain, old make, you'll have to qmake -o Makefile mainwindows.pro ( sorry about before, -o is not for log ).
    After this you can use make. As I said, a .pro file is not the same with a makefile( different syntax for start ).


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

    Default Re: "mainwindows" Example

    Marcel, I am so new to programming.

    What is [HTML]add CONFIG += qt debug[/HTML] and where do I add that?

    Also, what is [HTML] -o [/HTML] and where do I add that?

    Also, why arent I seeing an executable anywhere?

    When I ran "qmake" on the command line it didnt give me errors so I should have seen an executable somewhere, correct?

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.