gdbm

Jiri Petrlik jiripetrlik na seznam.cz
Čtvrtek Červenec 10 20:08:43 CEST 2003


Zdravim,
koupil jsem si knihu Linux zaciname programovat. Pokousel jsem se podle teto 
knihy prekompilovat uvedeny priklad z jejich knihy. Kompilator jsem spoustel 
prikazem: gcc -o dbm1 dbm1.c -lgdbm
a dostal jsem vypis:
/home/jirka/tmp/ccAP0rqd.o: In function `main':
/home/jirka/tmp/ccAP0rqd.o(.text+0x23): undefined reference to `dbm_open'
/home/jirka/tmp/ccAP0rqd.o(.text+0x228): undefined reference to `dbm_store'
/home/jirka/tmp/ccAP0rqd.o(.text+0x2c9): undefined reference to `dbm_fetch'
/home/jirka/tmp/ccAP0rqd.o(.text+0x34e): undefined reference to `dbm_close'
collect2: ld returned 1 exit status

pak jsem se pokousel kompilovat prikazem: gcc -I /usr/local/include/ -L 
/usr/local/lib -o dbm1 dbm1.c -lgdbm
a dostal jsem vypis:
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-system directory
/home/jirka/tmp/ccQnO8i2.o: In function `main':
/home/jirka/tmp/ccQnO8i2.o(.text+0x23): undefined reference to `dbm_open'
/home/jirka/tmp/ccQnO8i2.o(.text+0x228): undefined reference to `dbm_store'
/home/jirka/tmp/ccQnO8i2.o(.text+0x2c9): undefined reference to `dbm_fetch'
/home/jirka/tmp/ccQnO8i2.o(.text+0x34e): undefined reference to `dbm_close'
collect2: ld returned 1 exit status

Knihovnu jsem si kompiloval sam a vse probehlo podle mne bez problemu. 
Spoustel jsem i make install-compat.
Prekladany soubor prikladam, neni moc velky.

Jiri Petrlik
------------- další část ---------------
A non-text attachment was scrubbed...
Name: dbm1.c
Type: text/x-csrc
Size: 2620 bytes
Desc: [žádný popis není k dispozici]
URL: <http://www.linux.cz/pipermail/linux/attachments/20030710/19dfcc07/attachment.bin>


Další informace o konferenci Linux