Hi! I recently installed Qt 4 on my Powerbook G4 and everything works out great. The only problem is I don't know how to compile programs! I've tried the simple hello world program in the tutorial and couldn't get how the qmake works. Everytime I create a .pro file, I don't know where to go next. I've done everything the tutorial told me to do but whenever I type in make, it says it doesn't have any target files or something...
Anyway...I never did plan to use qmake. I would really like to compile using g++. I've acquired a document that teaches how to compile using g++ but it won't work for me because of the last line what requires me to input "-lqt". It's a link to a dylib named qt which isn't in my machine for some reason. I wonder why...
So here's what I've got so far:
g++ -g -o test test.cpp -I/usr/local/Trolltech/Qt-4.1.3/include/QtGui -I/usr/local/Trolltech/Qt-4.1.3/include/QtCore -L/usr/local/Trolltech/Qt-4.1.3/lib
g++ -g -o test test.cpp -I/usr/local/Trolltech/Qt-4.1.3/include/QtGui -I/usr/local/Trolltech/Qt-4.1.3/include/QtCore -L/usr/local/Trolltech/Qt-4.1.3/lib
To copy to clipboard, switch view to plain text mode
And this is what it spits out:
/usr/bin/ld: Undefined symbols:
QString::fromAscii_helper(char const*,
int) collect2: ld returned 1 exit status
/usr/bin/ld: Undefined symbols:
QPushButton::QPushButton(QString const&, QWidget*)
QPushButton::~QPushButton()
QApplication::exec()
QApplication::QApplication(int&, char**)
QApplication::~QApplication()
QString::fromAscii_helper(char const*, int)
QString::free(QString::Data*)
QWidget::resize(QSize const&)
collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
What am I doing wrong? I really want to start coding. But if I can't get past that hello world, how am I supposed to start? I'm trying my best to not be tempted by developing Java applications since I think C++ is more versatile and...it's C! You can make anything. No limits. hehe.
Any help would be appreciated.
I haven't started coding in Qt yet and I already think it's a nice API to work on.
Specs: Mac OS X 10.4.10, Powerbook G4, PPC 1.5 Ghz
Thanks in advance
Bookmarks