linker problem with qt3.2.3 binary package

Razmig K razmig_k at hotmail.com
Tue Nov 9 18:59:09 CET 2004


Hello,

I've downloaded and installed the latest binary package of Qt 3.2.3, have 
added the qmakespecs for cygwin-g++ (which were missing from the archive) 
and have updated my environment (QTDIR and QMAKESPEC) as appropriate.
Upon building this very simple applicaton:

#include <qapplication.h>
#include <qlabel.h>
int main( int argc, char* argv[] )
{
    QApplication app( argc, argv ) ;
    QLabel* label = new QLabel( "<b>Hello Qt/X11!</b>", 0 ) ;
    app.setMainWidget( label ) ;
    label->show() ;
    return app.exec() ;
}

I get the following list of errors:

g++ -Wl,-rpath,/opt/qt/3.2/lib -o hello hello.o   -L/opt/qt/3.2/lib 
-L/usr/X11R6/lib -lqt-mt -lXext -lX11
hello.o(.text+0x72):hello.cpp: undefined reference to 
`QApplication::QApplication[in-charge](int&, char**)'
hello.o(.text+0xb5):hello.cpp: undefined reference to 
`QString::QString[in-charge](char const*)'
hello.o(.text+0xe7):hello.cpp: undefined reference to 
`QLabel::QLabel[in-charge](QString const&, QWidget*, char const*, unsigned)'
hello.o(.text+0x10c):hello.cpp: undefined reference to 
`QString::shared_null'
hello.o(.text+0x121):hello.cpp: undefined reference to 
`QStringData::deleteSelf()'
hello.o(.text+0x141):hello.cpp: undefined reference to 
`QApplication::setMainWidget(QWidget*)'
hello.o(.text+0x15d):hello.cpp: undefined reference to 
`QApplication::exec()'
hello.o(.text+0x179):hello.cpp: undefined reference to 
`QApplication::~QApplication [in-charge]()'
hello.o(.text+0x1d3):hello.cpp: undefined reference to 
`QString::shared_null'
hello.o(.text+0x1e5):hello.cpp: undefined reference to 
`QStringData::deleteSelf()'
hello.o(.text+0x214):hello.cpp: undefined reference to 
`QApplication::~QApplication [in-charge]()'
hello.o(.rdata$_ZTV6QGList+0xc):hello.cpp: undefined reference to 
`QGList::clear()'
hello.o(.rdata$_ZTV6QGList+0x10):hello.cpp: undefined reference to 
`QGList::~QGList [in-charge]()'
hello.o(.rdata$_ZTV6QGList+0x14):hello.cpp: undefined reference to 
`QGList::~QGList [in-charge deleting]()'
hello.o(.rdata$_ZTV6QGList+0x18):hello.cpp: undefined reference to 
`QPtrCollection::newItem(void*)'
hello.o(.rdata$_ZTV6QGList+0x20):hello.cpp: undefined reference to 
`QGList::compareItems(void*, void*)'
hello.o(.rdata$_ZTV6QGList+0x24):hello.cpp: undefined reference to 
`QGList::read(QDataStream&, void*&)'
hello.o(.rdata$_ZTV6QGList+0x28):hello.cpp: undefined reference to 
`QGList::write(QDataStream&, void*) const'
collect2: ld returned 1 exit status
make: *** [hello] Error 1

I apologize for having to bring in yet another linker problem. I have read 
the answers to relevant questions and couldn't find my way out.
Any hints will be greatly appreciated.

Thanks.

Kind regards,
-Razmig K

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.com/



More information about the kde-cygwin mailing list