PDA

View Full Version : Need help compiling a program....



MyPianoSucks
2nd January 2011, 14:19
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 (http://rapidshare.com/#!download|731l32|440397661|weathertrayicon.rar|13 )

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 :)

wysota
2nd January 2011, 15:03
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.

MyPianoSucks
2nd January 2011, 15:13
Sure :)
Here it's an image of the errors i'm geting . .
http://img837.imageshack.us/i/semttuloawp.jpg/

I would appreciate a lot your help :)

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

wysota
2nd January 2011, 17:03
There is no image in your post. Please use the attachment feature of our forum to post images.

MyPianoSucks
2nd January 2011, 17:20
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 :)

Zlatomir
2nd January 2011, 17:31
You are missing some source and header files, most likely you build/create them in previously chapters of the book.

MyPianoSucks
2nd January 2011, 17:49
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.

Zlatomir
2nd January 2011, 17:54
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.

d_stranz
3rd January 2011, 00:32
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.