Re: librarie static

Page principale

Répondre à ce message
Auteur: Patrick Dupre
Date:  
À: Frédéric
CC: guilde
Sujet: Re: librarie static
On Wed, 7 Apr 2010, Frédéric wrote:

> On mercredi 07 avril 2010, Patrick Dupre wrote:
>
>>> Avec l'option -static, tout bêtement.
>>
>> Et bien non, ou alors il y a un autre probleme.
>> Par defaut nm me donne U pour la routine dont j'ai besoin.
>> Je comprends que la routine n'est pas dans la librarie alors qu'elle est
>> bien en T dans le fichier libmalib.a (et en U dans libmalib.so).
>> Est-ce qu'il y a quelque chose qui m'echappe ?
>>
>> J'ai besoin de voir cette routine en T dans la fichier final.
>
> Tu as bien enlevé -shared, et mis -static à la place ? Ou alors, c'est moi
> qui n'ai pas compris ton besoin...
>

La situation est plus compliquee !
J'ai besoin d'utilise -shared sinon j'ai plein de "undefined reference to"
-shared et -static me donne un message d'erreur:

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.1/crtbeginT.o:
relocation R_X86_64_32 against `__DTOR_END__' can not be used when making
a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.1/crtbeginT.o: could not read
symbols: Bad value

J'utilise bien l'option -fPIC pour ma librarie et je peux penser
que la librarie dont l'ai besoin aussi (libMinuit2.a) !

Je vois plus trop quoi essayer


  -- 
---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: pd520@???
==========================================================================