[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Comment creer une librairie partagee ?
Ludovic Kuty wrote:
>
> Salut a tout le monde,
>
> Est-ce que qqn sait comment creer une librairie partagee (libmachin.so)
> a partir d'un fichier source C.
> Quelles sont les options a donner au compilateur gcc ?
>
> Je croyais qu'il suffisait de compiler le fichier avec
> les options '-c -fPIC' et que l'objet correspondant formait la librairie.
> Mais ca ne marche pas.
>
> Merci d'avance.
>
From: ELF-HOWTO :
It's much simpler to make shared libraries with ELF. Typically, just
compile all
the object files with -fPIC, then link with a command like :
gcc -shared -Wl,-soname,libfoo.so.x -o libfoo.so.x.y *.o
Ce Howto est sur sunsite... :)
Raff
---------
This message was sent by Majordomo 1.94.3. Please report problems to
manu@rtfm.be. If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.