#1 Le 12/06/2006, à 14:38
- Lknight

Résolu - undefined reference to ... :(
Bonjour,
j'"ai un ennuis de linkage avec une librairie crypto (botan), je ne sais pas quoi faire pour l'arranger ![]()
help, svp
ci-dessous le fichier d'erreur de scons
./libmy_lib.a(Cle.o): In function `Cle::ecrireCles()':Cle.cpp:(.text+0x8a6): undefined reference to `Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Cle.cpp:(.text+0x938): undefined reference to `Botan::DL_Group::DL_Group(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Cle.cpp:(.text+0x94d): undefined reference to `Botan::DSA_PrivateKey::DSA_PrivateKey(Botan::DL_Group const&)'
:Cle.cpp:(.text+0x9c6): undefined reference to `Botan::X509::PEM_encode(Botan::X509_PublicKey const&)'
:Cle.cpp:(.text+0xaa0): undefined reference to `Botan::PKCS8::PEM_encode(Botan::PKCS8_PrivateKey const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Cle.cpp:(.text+0xb98): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
:Cle.cpp:(.text+0xbb1): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTVN5Botan14PK_Signing_KeyE[vtable for Botan::PK_Signing_Key]+0x2c): undefined reference to `Botan::PK_Key::get_oid() const'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTIN5Botan14PK_Signing_KeyE[typeinfo for Botan::PK_Signing_Key]+0x10): undefined reference to `typeinfo for Botan::PK_Key'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTVN5Botan22PK_Verifying_wo_MR_KeyE[vtable for Botan::PK_Verifying_wo_MR_Key]+0x2c): undefined reference to `Botan::PK_Key::get_oid() const'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTIN5Botan22PK_Verifying_wo_MR_KeyE[typeinfo for Botan::PK_Verifying_wo_MR_Key]+0x10): undefined reference to `typeinfo for Botan::PK_Key'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTCN5Botan16PKCS8_PrivateKeyE0_NS_14X509_PublicKeyE[vtable for Botan::PKCS8_PrivateKey]+0x3c): undefined reference to `Botan::PK_Key::get_oid() const'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTIN5Botan14X509_PublicKeyE[typeinfo for Botan::X509_PublicKey]+0x10): undefined reference to `typeinfo for Botan::PK_Key'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTVN5Botan16PKCS8_PrivateKeyE[vtable for Botan::PKCS8_PrivateKey]+0x40): undefined reference to `Botan::PK_Key::get_oid() const'
./libmy_lib.a(Cle.o):(.gnu.linkonce.r._ZTVN5Botan14X509_PublicKeyE[vtable for Botan::X509_PublicKey]+0x2c): undefined reference to `Botan::PK_Key::get_oid() const'
./libmy_lib.a(Cle.o): In function `Botan::PK_Key::~PK_Key()':Cle.cpp:(.gnu.linkonce.t._ZN5Botan6PK_KeyD2Ev[Botan::PK_Key::~PK_Key()]+0x7): undefined reference to `vtable for Botan::PK_Key'
./libmy_lib.a(Cle.o): In function `Botan::DSA_PrivateKey::~DSA_PrivateKey()':Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x22): undefined reference to `vtable for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x36): undefined reference to `vtable for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x47): undefined reference to `vtable for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x58): undefined reference to `vtable for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x5f): undefined reference to `vtable for Botan::DSA_PrivateKey'
./libmy_lib.a(Cle.o):Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x74): more undefined references to `vtable for Botan::DSA_PrivateKey' follow
./libmy_lib.a(Cle.o): In function `Botan::DSA_PrivateKey::~DSA_PrivateKey()':Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x8c): undefined reference to `VTT for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0xa8): undefined reference to `VTT for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x156): undefined reference to `VTT for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x1ba): undefined reference to `VTT for Botan::DSA_PrivateKey'
:Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x29c): undefined reference to `VTT for Botan::DSA_PrivateKey'
./libmy_lib.a(Cle.o):Cle.cpp:(.gnu.linkonce.t._ZN5Botan14DSA_PrivateKeyD1Ev[Botan::DSA_PrivateKey::~DSA_PrivateKey()]+0x2e5): more undefined references to `VTT for Botan::DSA_PrivateKey' follow
./libmy_lib.a(Empreinte.o): In function `Empreinte::genererEmpreinte()':Empreinte.cpp:(.text+0x1b3): undefined reference to `Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Empreinte.cpp:(.text+0x25b): undefined reference to `Botan::Hex_Encoder::Hex_Encoder(bool, unsigned int, Botan::Hex_Encoder::Case)'
:Empreinte.cpp:(.text+0x2ca): undefined reference to `Botan::Hash_Filter::Hash_Filter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)'
:Empreinte.cpp:(.text+0x2f9): undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)'
:Empreinte.cpp:(.text+0x3c2): undefined reference to `Botan::Pipe::start_msg()'
:Empreinte.cpp:(.text+0x3d7): undefined reference to `Botan::operator>>(std::basic_istream<char, std::char_traits<char> >&, Botan::Pipe&)'
:Empreinte.cpp:(.text+0x3e2): undefined reference to `Botan::Pipe::end_msg()'
:Empreinte.cpp:(.text+0x3fc): undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
:Empreinte.cpp:(.text+0x43c): undefined reference to `Botan::Pipe::~Pipe()'
:Empreinte.cpp:(.text+0x455): undefined reference to `Botan::Pipe::~Pipe()'
:Empreinte.cpp:(.text+0x468): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
:Empreinte.cpp:(.text+0x481): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
./libmy_lib.a(Signature.o): In function `Signature::b64_decode(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':Signature.cpp:(.text+0x1b7): undefined reference to `Botan::Base64_Decoder::Base64_Decoder(Botan::Decoder_Checking)'
:Signature.cpp:(.text+0x1e1): undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)'
:Signature.cpp:(.text+0x1f3): undefined reference to `Botan::Pipe::process_msg(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Signature.cpp:(.text+0x22e): undefined reference to `Botan::Pipe::read_all(unsigned int)'
:Signature.cpp:(.text+0x23c): undefined reference to `Botan::Pipe::~Pipe()'
:Signature.cpp:(.text+0x24f): undefined reference to `Botan::Pipe::~Pipe()'
./libmy_lib.a(Signature.o): In function `Signature::verifierSignature(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':Signature.cpp:(.text+0x5b7): undefined reference to `Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Signature.cpp:(.text+0x5f9): undefined reference to `Botan::X509::load_key(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Signature.cpp:(.text+0x66e): undefined reference to `typeinfo for Botan::DSA_PublicKey'
:Signature.cpp:(.text+0x74b): undefined reference to `Botan::get_pk_verifier(Botan::PK_Verifying_wo_MR_Key const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Signature_Format)'
:Signature.cpp:(.text+0x782): undefined reference to `Botan::PK_Verifier_Filter::PK_Verifier_Filter(Botan::PK_Verifier*, Botan::MemoryRegion<unsigned char> const&)'
:Signature.cpp:(.text+0x7af): undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)'
:Signature.cpp:(.text+0x815): undefined reference to `Botan::Pipe::start_msg()'
:Signature.cpp:(.text+0x84e): undefined reference to `Botan::operator>>(std::basic_istream<char, std::char_traits<char> >&, Botan::Pipe&)'
:Signature.cpp:(.text+0x859): undefined reference to `Botan::Pipe::end_msg()'
:Signature.cpp:(.text+0x877): undefined reference to `Botan::Pipe::read(unsigned char&, unsigned int)'
:Signature.cpp:(.text+0x93b): undefined reference to `Botan::Pipe::~Pipe()'
:Signature.cpp:(.text+0x94e): undefined reference to `Botan::Pipe::~Pipe()'
:Signature.cpp:(.text+0x9af): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
:Signature.cpp:(.text+0x9c8): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
./libmy_lib.a(Signature.o): In function `Signature::genererSignature(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':Signature.cpp:(.text+0xc94): undefined reference to `Botan::LibraryInitializer::LibraryInitializer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Signature.cpp:(.text+0xcdd): undefined reference to `Botan::PKCS8::load_key(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
:Signature.cpp:(.text+0xd5d): undefined reference to `typeinfo for Botan::DSA_PrivateKey'
:Signature.cpp:(.text+0xe0f): undefined reference to `Botan::Base64_Encoder::Base64_Encoder(bool, unsigned int)'
:Signature.cpp:(.text+0xe84): undefined reference to `Botan::get_pk_signer(Botan::PK_Signing_Key const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Botan::Signature_Format)'
:Signature.cpp:(.text+0xee3): undefined reference to `Botan::Pipe::Pipe(Botan::Filter*, Botan::Filter*, Botan::Filter*, Botan::Filter*)'
:Signature.cpp:(.text+0xf49): undefined reference to `Botan::Pipe::start_msg()'
:Signature.cpp:(.text+0xf82): undefined reference to `Botan::operator>>(std::basic_istream<char, std::char_traits<char> >&, Botan::Pipe&)'
:Signature.cpp:(.text+0xf8d): undefined reference to `Botan::Pipe::end_msg()'
:Signature.cpp:(.text+0xfb2): undefined reference to `Botan::Pipe::read_all_as_string(unsigned int)'
:Signature.cpp:(.text+0x1161): undefined reference to `Botan::Pipe::~Pipe()'
:Signature.cpp:(.text+0x117a): undefined reference to `Botan::Pipe::~Pipe()'
:Signature.cpp:(.text+0x11e3): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
:Signature.cpp:(.text+0x11fc): undefined reference to `Botan::LibraryInitializer::~LibraryInitializer()'
./libmy_lib.a(Signature.o): In function `Botan::Filter::~Filter()':Signature.cpp:(.gnu.linkonce.t._ZN5Botan6FilterD2Ev[Botan::Filter::~Filter()]+0x7): undefined reference to `vtable for Botan::Filter'
./libmy_lib.a(Signature.o): In function `Botan::PK_Signer_Filter::PK_Signer_Filter(Botan::PK_Signer*)':Signature.cpp:(.gnu.linkonce.t._ZN5Botan16PK_Signer_FilterC1EPNS_9PK_SignerE[Botan::PK_Signer_Filter::PK_Signer_Filter(Botan::PK_Signer*)]+0xd): undefined reference to `Botan::Filter::Filter()'
:Signature.cpp:(.gnu.linkonce.t._ZN5Botan16PK_Signer_FilterC1EPNS_9PK_SignerE[Botan::PK_Signer_Filter::PK_Signer_Filter(Botan::PK_Signer*)]+0x12): undefined reference to `vtable for Botan::PK_Signer_Filter'
collect2: ld returned 1 exit status
scons: *** [app] Error 1Dernière modification par Lknight (Le 13/06/2006, à 05:39)
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#2 Le 12/06/2006, à 16:57
- node
Re : Résolu - undefined reference to ... :(
Salut,
À mon avis, il faut l'installer. Il donne les sources ou des rpm sur le site officiel.
nota : la traduction de library est bibliothèque, non pas une librairie.
Hors ligne
#3 Le 12/06/2006, à 19:46
- Lknight

Re : Résolu - undefined reference to ... :(
hum, la bibli est installée...
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#4 Le 12/06/2006, à 20:15
- node
Re : Résolu - undefined reference to ... :(
Arf, désolé, mais tu aurais pu le mettre dans ton message, je ne pouvais pas le deviner.
J'avais regardé dans /lib, /usr/lib, pas trouvé, recherche sur packages.ubuntu.com, pas trouvé, donc, j'ai supposé qu'il y avait de forte chance qu'elle dusse être installée à la main...
Parce que si l'éditeur de lien n'arrive pas à faire son travail, c'est bien qu'il ne trouve pas les références à la bibliothèque n'est-ce pas ?
Tu as sûrement les bons en-têtes et inclus la bibliothèque quelque part dans ton makefile. Je ne vois pas d'où ça peut venir alors.
Hors ligne
#5 Le 12/06/2006, à 20:28
- node
Re : Résolu - undefined reference to ... :(
scons... Ça a l'air pratique (je ne connaissais pas), c'est un genre de gnatmake mais pas pour ada ?
Hors ligne
#6 Le 12/06/2006, à 20:30
- Lknight

Re : Résolu - undefined reference to ... :(
je build l'application avec scons
et la compilation passe
ce n'est que le linkage qui deconne
pourtant j'ai fais l'install à la main de botan, via les src
et ca passe correctement, sans encombres
sauf que gcc ne trouve pas les références lors du link de mon app ![]()
Dernière modification par Lknight (Le 12/06/2006, à 20:33)
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#7 Le 12/06/2006, à 20:40
- Lknight

Re : Résolu - undefined reference to ... :(
scons... Ça a l'air pratique (je ne connaissais pas), c'est un genre de gnatmake mais pas pour ada ?
ca t'évite de te taper un makefile et c plus rapide
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#8 Le 12/06/2006, à 20:59
- node
Re : Résolu - undefined reference to ... :(
Je ne connais donc pas scons.
Est-ce que les fichiers d'en-têtes de la bibliothèque sont présents dans /usr/include ?
Hors ligne
#9 Le 12/06/2006, à 21:51
- Lknight

Re : Résolu - undefined reference to ... :(
non c dans /usr/local/include/
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#10 Le 12/06/2006, à 22:18
- Lknight

Re : Résolu - undefined reference to ... :(
je v essayer de faire qqchose avec libgcrypt
ca m'a l'air différent, et j'ai aussi trouvé un autre bazard avec botan, c botan-config, je me demande si je ne dois pas l'utiliser comme j'utilisais wxconfig
v voir ca
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne
#11 Le 12/06/2006, à 22:52
- Lknight

Re : Résolu - undefined reference to ... :(
je v aller me pendre, je devais simplement ajouter ) mon sconstruct (fichier qui sert à dire ce qu'il faut compiler) qu'il devair utiliser botan-config avec les options libs etc... forcement qu'il n'y avais pas de référence, grrrrrr
je v me fouetter tiens
bon mnt j'ai des erreur interne qui bloquent l'app...
Dernière modification par Lknight (Le 12/06/2006, à 22:54)
- LK -
-------------------------------------------------------
DAMNED! Why is it always 42 !!
I hate this fucking calculator!
Hors ligne