qt3 statically linked

Alexandros Droseltis rakewell at udk-berlin.de
Thu Sep 12 19:08:00 EEST 2002


On Tuesday 10 September 2002 21:30, V13 wrote:
> On Tuesday 10 September 2002 10:08, Alexandros Droseltis wrote:
> > Ti na po, to thema eixe tethei kai sto qt interest archive apo diaforous
> > se diafores parallages· dokimasa o,ti protathike stis apantiseis, alla
> > xwris apotelesma. Dokimasa episis na apomakryno oles tis shared, etsi
> > oste na anagkastei na syndesei apo tis static, alla pali mia ap'ta idia.
>
> Mipos ta undefined references einai templates ?

Nai, itan (prin dokimaso auto pou proteines me to libtool). Ebgainan xiliades 
grammes apo tis opoies oi protes itan):

main.o: In function `Board::tr(char const *, char const *)':
main.o(.text+0x2c): undefined reference to `qApp'
main.o(.text+0x46): undefined reference to `qApp'
main.o(.text+0x4d): undefined reference to `QApplication::translate(char const 
*, char const *, char const *, QApplication::Encoding) const'
main.o(.text+0x63): undefined reference to `QString::fromLatin1(char const *, 
int)'
main.o: In function `Board::trUtf8(char const *, char const *)':
main.o(.text+0x8c): undefined reference to `qApp'
main.o(.text+0xa6): undefined reference to `qApp'
.......................................................................................

> Episis, xrisimopoieis gcc h
> g++ (prepei na'nai to g++) ? 

g++

>Telos, dokimase anti gia g++ na doseis:
>
> libtool --mode=compile g++
> gia na kaneis compile ta programmta
>
> kai
> libtool --mode=link g++
>
> gia na ta kaneis link

To dokimasa ki auto. Tora sumbainei to eksis paradokso:

a) Otan dino ta L_FLAGS os
L_FLAGS=-L$(QTDIR)/lib -static -lqt
i make leitourgei xwris lathos os to telos. Alla...

# file application
application: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), not stripped

An omos apenergopoiiso ta L_FLAGS kai balo ti bibliothiki ritws sta OBJECTS os

OBJECTS=main.o file1.o file2.o kai_loipa.o $(QTDIR)/lib/libqt.a

bgainoun pali ta "undefined reference". Alla tora einai alla:

/usr/lib/qt3/lib/libqt.a(qapplication_x11.o): In function 
`xim_destroy_callback':
qapplication_x11.o(.text+0xb1a): undefined reference to 
`XRegisterIMInstantiateCallback'
/usr/lib/qt3/lib/libqt.a(qapplication_x11.o): In function 
`QApplication::create_xim(void)':
qapplication_x11.o(.text+0xb3a): undefined reference to `XOpenIM'
qapplication_x11.o(.text+0xb6c): undefined reference to `XSetIMValues'
qapplication_x11.o(.text+0xba5): undefined reference to `XGetIMValues'
qapplication_x11.o(.text+0xc86): undefined reference to `XFree'
qapplication_x11.o(.text+0xcb1): undefined reference to 
`XUnregisterIMInstantiateCallback'
/usr/lib/qt3/lib/libqt.a(qapplication_x11.o): In function `qt_x_errhandler':
qapplication_x11.o(.text+0xe3e): undefined reference to `XGetErrorText'
/usr/lib/qt3/lib/libqt.a(qapplication_x11.o): In function 
`qt_x11_intern_atom(char const *, unsigned long *)':
qapplication_x11.o(.text+0xeca): undefined reference to `XInternAtom'
/usr/lib/qt3/lib/libqt.a(qapplication_x11.o): In function 
`qt_x11_process_intern_atoms(void)':
..................................................................

Pantos to programma dynamically linked me g++ den exei problima.
Exw anebasei to Makefile sto
http://www.oase.udk-berlin.de/~rakewell/Makefile

An mporouses na rikseis mia matia, tha imoun eugnomwn.

Euxaristo
Alexandros




More information about the Linux-greek-users mailing list