[so] creare shared library

Cosmin Arad so@atlantis.cs.pub.ro
Sun, 23 Nov 2003 08:33:25 -0800 (PST)


La ultima comanda gcc ai specificat flagul -c care
inseamna doar compilare fara legare, deci -l nu isi
are sensul.

Cosmin

--- Ruxi Jitianu <ruxij@pcnet.ro> wrote:
> Buna!
> 
> As vrea sa ma lamureasca si pe mine cineva de ce
> obtin urmataore eroare 
> daca incerc sa crez shared library de care avem
> nevoie.Am urmat exemplul 
> cu libhello din Program Library HOWTO.
> 
> 
> [root@ruxi tema3]# gcc -fPIC -Wall -g -c
> libmonitor1.c
> [root@ruxi tema3]# gcc -g -shared
> -Wl,-soname,libmonitor1.so.0 -o libmonitor1.so.0.0
> libmonitor1.o -lc
> [root@ruxi tema3]# /sbin/ldconfig -n .
> [root@ruxi tema3]# ln -sf libmonitor1.so.0
> libmonitor1.so
> [root@ruxi tema3]# gcc -Wall -g -c rw.c -o rw.o
> [root@ruxi tema3]# gcc -Wall -c rw.c -o rw.o -L.
> -lmonitor1
> gcc: -lmonitor1: linker input file unused since
> linking not done
> 
> p.s.
> 
> nu am mai copiat libmonitor1.so.0.0 in vreun
> /usr/local/lib pt ca vreau sa fie in directorul
> curent,
> asa ca fac chestia aia cu /sbin/ldconfig -n .


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree