Results 1 to 9 of 9

Thread: Need help compiling a program....

  1. #1
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Need help compiling a program....

    Hi everybody!

    I jus started reading today a QT programming book called "Prentice.Hall.Advanced.Qt.Programming" but i can't compile any program . I read a book before and i compile all programs by doing the following:

    qmake -project
    qmake -file.pro
    make
    Here is an example from the book:
    Link

    If it's not ask for too much, i would like that someone try to compile this and tell me how it was done.
    Thanks you

  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: Need help compiling a program....

    Usually a compilation of a Qt application involves calling qmake (without any parameters) and then make (or equivalent). Without knowing what problems you have it's not possible to help you more. At least please post the error messages you get.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    MyPianoSucks (2nd January 2011)

  4. #3
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help compiling a program....

    Sure
    Here it's an image of the errors i'm geting . .


    I would appreciate a lot your help

    EDIT: copy the url from the image to see it :S

  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: Need help compiling a program....

    There is no image in your post. Please use the attachment feature of our forum to post images.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help compiling a program....

    Ok, sorry all this mistakes. I'm new here, so i think you'll understand it perfectly
    I added the file to the attachments right now! Have a look please
    Attached Images Attached Images

  7. #6
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Need help compiling a program....

    You are missing some source and header files, most likely you build/create them in previously chapters of the book.

  8. #7
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help compiling a program....

    I can't be missing header files/source files, at least from the book, considering that i'm still reading the 1st chapter :S . Maybe i can find them in the QT installation path. I'll give a try.

  9. #8
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Need help compiling a program....

    They are not from the Qt SDk.

    They are from the book, the include path is set to folders next to your Weathertray (project you are trying to build) you should have that aqp and option_parser folders, both containing some .cpp and .hpp files in them.

  10. #9
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Need help compiling a program....

    The Advanced Qt Programming book really -is- an advanced book, designed for people who are already very good at Qt programming. It isn't for learning Qt fundamentals. This book uses a couple of libraries developed by the author, and you must install and build them first before you can build any of the examples. It seems pretty clear that you haven't done that yet.

    So find the project that contains the AQP namespace files, build that library first, then make sure the paths to the library's header and library files are correct in the makefiles for the examples. Once that first part is done, you should be able to build and run the examples.

Similar Threads

  1. Interrupt/Exception caught while compiling Qt program
    By Qt Coder in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2010, 22:08
  2. Replies: 1
    Last Post: 30th April 2010, 13:25
  3. Replies: 1
    Last Post: 15th February 2010, 23:20
  4. LNK 2019 Error while compiling qt program in VS2008
    By mevkurray in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 7th February 2010, 00:29
  5. Program not compiling on Fresh install of Leopard
    By dvmorris in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 10:22

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.