Date: Thu, 12 Oct 2000 13:14:59 -0500 From: nathan <beemern@telecom.ksu.edu> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: c++/qt lib compile error Message-ID: <39E5FFA3.9DE8D056@telecom.ksu.edu>
next in thread | raw e-mail | index | archive | help
I know this isn't fbsd specific but... i'm tryin to follow a qt tutorial to get started with the qt libraries. when tryin to compile 'hello world' : --snip-- #include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { QApplication a( argc, argv ); QPushButton hello( "Hello world!", 0 ); hello.resize( 100, 30 ); a.setMainWidget( &hello ); hello.show(); return a.exec(); } --snip-- i get this: --snip-- [nathan@sabre src]$ g++ -I/usr/local/qt/include hello_qt.cc /tmp/ccJ85228.o: In function `main': /tmp/ccJ85228.o(.text+0x28): undefined reference to `QApplication::QApplication(int &, char **)' /tmp/ccJ85228.o(.text+0x3f): undefined reference to `QApplication::~QApplication(void)' /tmp/ccJ85228.o(.text+0x5e): undefined reference to `QString::QString(char const *)' /tmp/ccJ85228.o(.text+0xa8): undefined reference to `QPushButton::QPushButton(QString const &, QWidget *, char const *)' /tmp/ccJ85228.o(.text+0xe7): undefined reference to `QPushButton::~QPushButton(void)' /tmp/ccJ85228.o(.text+0x10e): undefined reference to `QPushButton::resize(int, int)' /tmp/ccJ85228.o(.text+0x124): undefined reference to `QApplication::setMainWidget(QWidget *)' /tmp/ccJ85228.o(.text+0x136): undefined reference to `QWidget::show(void)' /tmp/ccJ85228.o(.text+0x145): undefined reference to `QApplication::exec(void)' /tmp/ccJ85228.o(.text+0x169): undefined reference to `QPushButton::~QPushButton(void)' /tmp/ccJ85228.o(.text+0x188): undefined reference to `QApplication::~QApplication(void)' /tmp/ccJ85228.o: In function `QString::~QString(void)': /tmp/ccJ85228.o(.gnu.linkonce.t._$_7QString+0x29): undefined reference to `QStringData::deleteSelf(void)' [nathan@sabre src]$ --snip-- i've looked in my -I arg dir and it DOES contain the .h files in the source. what gives? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39E5FFA3.9DE8D056>