Results 1 to 7 of 7

Thread: Can't compile sample - Mac OS X 10.5, latest QT SDK download

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Can't compile sample - Mac OS X 10.5, latest QT SDK download

    Hi. This is my second shot at Qt. I tried a year ago and gave up. Similar errors as now. Hopefully, I can get it working this time.

    I've just downloaded the latest SDK. I'm running current Leopard. Xcode 3.1 is installed and I use it for Java, C and C++ development all the time.

    For the life of me, I cannot compile the sample on page 4 of the Qtbook (C++ GUI Programming with Qt4, 2nd Edition). ("Hello QT!)

    I've entered the program into a qt_test2.cpp file in a qt_test2 folder. (~/Xcode/qt_test2/qt_test2.cpp).

    I run qmake while in that folder:
    Qt Code:
    1. qmake -project
    To copy to clipboard, switch view to plain text mode 
    and it creates qt_test2.pro. Now, I have 2 files in /qt_test2.

    Then, I run:
    Qt Code:
    1. qmake -spec macx-xcode qt_test2.pro
    To copy to clipboard, switch view to plain text mode 
    and the folder now contains:

    Qt Code:
    1. rw-r--r-- 1 toddburch toddburch 600 Sep 28 21:33 Info.plist
    2. -rw-r--r-- 1 toddburch toddburch 293 May 1 2008 qt_test2.cpp
    3. -rw-r--r-- 1 toddburch toddburch 594 Sep 28 21:32 qt_test2.pro
    4. drwxr-xr-x 5 toddburch toddburch 170 Sep 28 21:33 qt_test2.xcodeproj
    To copy to clipboard, switch view to plain text mode 
    and the xcodeproj contains:
    Qt Code:
    1. ~/Xcode/qt_test2/qt_test2.xcodeproj toddburch $ ls -l
    2. total 40
    3. -rw-r--r-- 1 toddburch toddburch 11269 Sep 28 21:33 project.pbxproj
    4. -rw-r--r-- 1 toddburch toddburch 3488 Sep 28 21:33 qt_makeqmake.mak
    5. -rw-r--r-- 1 toddburch toddburch 2549 Sep 28 21:33 qt_preprocess.mak
    To copy to clipboard, switch view to plain text mode 

    Now, I've run qmake in "project mode" and then in "make mode". There's no .app,
    which I expect, as I want to compile using Xcode. In Xcode, I open the qt_test2.xcodeproj file. (Project Screenshot attached).

    I then click Build in Xcode and get lots of error in code that is not mine. Here's a summary in the other screenshot.

    What am I doing wrong? Thanks, Todd.
    Attached Images Attached Images

Similar Threads

  1. Need sites to download sample projects
    By santhoshv84 in forum Qt Programming
    Replies: 3
    Last Post: 6th August 2008, 08:42
  2. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18

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
  •  
Qt is a trademark of The Qt Company.