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:
qmake -project
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:
qmake -spec macx-xcode qt_test2.pro
qmake -spec macx-xcode qt_test2.pro
To copy to clipboard, switch view to plain text mode
and the folder now contains:
rw-r--r-- 1 toddburch toddburch 600 Sep 28 21:33 Info.plist
-rw-r--r-- 1 toddburch toddburch 293 May 1 2008 qt_test2.cpp
-rw-r--r-- 1 toddburch toddburch 594 Sep 28 21:32 qt_test2.pro
drwxr-xr-x 5 toddburch toddburch 170 Sep 28 21:33 qt_test2.xcodeproj
rw-r--r-- 1 toddburch toddburch 600 Sep 28 21:33 Info.plist
-rw-r--r-- 1 toddburch toddburch 293 May 1 2008 qt_test2.cpp
-rw-r--r-- 1 toddburch toddburch 594 Sep 28 21:32 qt_test2.pro
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:
~/Xcode/qt_test2/qt_test2.xcodeproj toddburch $ ls -l
total 40
-rw-r--r-- 1 toddburch toddburch 11269 Sep 28 21:33 project.pbxproj
-rw-r--r-- 1 toddburch toddburch 3488 Sep 28 21:33 qt_makeqmake.mak
-rw-r--r-- 1 toddburch toddburch 2549 Sep 28 21:33 qt_preprocess.mak
~/Xcode/qt_test2/qt_test2.xcodeproj toddburch $ ls -l
total 40
-rw-r--r-- 1 toddburch toddburch 11269 Sep 28 21:33 project.pbxproj
-rw-r--r-- 1 toddburch toddburch 3488 Sep 28 21:33 qt_makeqmake.mak
-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.
Bookmarks