[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.
>
> Ludovic Kuty.
> ---------
> 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.
Bon ben je viens de solutionner mon probleme.
Pour info:
gcc -c -fPIC machin.c (ce qui genere le fichier machin.o)
gcc -shared -o libxxx.so machin.o (librairie libxxx.so cree et
contient les fonctions de machin.o).
Ludovic.
---------
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.