[linux] kompilacia kde aplikacii pod RH7.2

Lubo Drobny lubod na microstep-mis.sk
Čtvrtek Prosinec 13 11:43:01 CET 2001


Zdravim

ten program co je nizsie som skusal kompilovat (pok.cc) a dopadlo to takto:
jednoducho to nezlinkuje

g++ -V3.0.2 -I /usr/lib/qt2/include -L /usr/lib/qt2/lib/ -static pok.cc
/tmp/cc9DHojv.o: In function `main':
/tmp/cc9DHojv.o(.text+0xbe): undefined reference to` 
QIconView::QIconView(QWidget*, char const*, unsigned)'
/tmp/cc9DHojv.o(.text+0xd2): undefined reference to 
`QIconView::setWordWrapIconText(bool)'
/tmp/cc9DHojv.o(.text+0xfd): undefined reference to `QString::setLatin1(char 
const*, int)'
/tmp/cc9DHojv.o(.text+0x12b): undefined reference to `QIconView::~QIconView()'
/tmp/cc9DHojv.o(.text+0x17d): undefined reference to `QIconView::~QIconView()'
/tmp/cc9DHojv.o: In function `QString::QString()':
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x7): undefined reference to 
`QString::shared_null'
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x10): undefined reference to 
`QString::shared_null'
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringC1Ev+0x18): undefined reference to 
`QString::makeSharedNull()'
/tmp/cc9DHojv.o: In function `QString::~QString()':
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringD1Ev+0x21): undefined reference to 
`QString::shared_null'
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringD1Ev+0x29): undefined reference to 
`QString::shared_null'
/tmp/cc9DHojv.o(.gnu.linkonce.t._ZN7QStringD1Ev+0x3a): undefined reference to 
`QStringData::deleteSelf()'
collect2: ld returned 1 exit status

lubo

>
> Skus nejako dosiahnut, aby sa tento program:
> > #include "confdefs.h"
> > #include <qglobal.h>
> > #include <qapplication.h>
> > #include <qevent.h>
> > #include <qstring.h>
> > #include <qstyle.h>
> > #include <qiconview.h>
> > #if ! (QT_VERSION >= 222)
> > #error 1
> > #endif
> >
> > int main() {
> >     QStringList *t = new QStringList();
> >     QIconView iv(0);
> >     iv.setWordWrapIconText(false);
> >     QString s;
> >     s.setLatin1("Elvis is alive", 14);
> >     int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
> >     return 0;
> > }
>
> korektne skompiloval a zbehol. Aku chybu ti to hodi, ked sa ho pokusis
> skompilovat?




Další informace o konferenci linux