IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques Discussion :

Boost::asio et openssl


Sujet :

Bibliothèques

  1. #1
    Membre éclairé
    Avatar de Floréal
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    456
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France

    Informations forums :
    Inscription : Novembre 2004
    Messages : 456
    Points : 849
    Points
    849
    Par défaut Boost::asio et openssl
    Bonjour,
    J'ai tenté de compiler (à la main, enfin avec Codeblocks) les exemples SSL de boost ASIO sans grand succès. J'avais au préalable compilé moi même openssl avec mingw (GCC 3.4.5) sans problèmes. Mais lordsqu'il s'est agit de lier l'exemple ssl de boost ASIO, j'ai eu les messages suivants:
    C:\MinGW\include\boost-1_34\boost\asio\detail\socket_types.hpp:34: warning: #warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately
    C:\MinGW\include\boost-1_34\boost\asio\detail\socket_types.hpp:35: warning: #warning Assuming _WIN32_WINNT=0x0500 (i.e. Windows 2000 target)
    Debug\obj\main.o:: In function `ZN5boost4asio6detail23reactive_socket_serviceINS0_2ip3tcpENS1_14select_reactorILb0EEEE16shutdown_serviceEv':
    )]+0x1e):: undefined reference to `BIO_new_file'
    )]+0x70):: undefined reference to `PEM_read_bio_DHparams'
    )]+0x84):: undefined reference to `BIO_free'
    )]+0xb5):: undefined reference to `BIO_free'
    )]+0xed):: undefined reference to `DH_free'
    )]+0xc1):: undefined reference to `BIO_new_bio_pair'
    )]+0x1a):: undefined reference to `BIO_free'
    ::do_init::do_init()]+0xa6):: undefined reference to `CRYPTO_num_locks'
    Debug\obj\main.o:: In function `main':
    C:\Documents and Settings\U502136\Mes documents\C++\asiosslserver\main.cpp:149: undefined reference to `CRYPTO_set_locking_callback'
    Debug\obj\main.o:: In function `ZN5boost4asio6detail23reactive_socket_serviceINS0_2ip3tcpENS1_14select_reactorILb0EEEE16shutdown_serviceEv':
    ::start()]+0x23):: undefined reference to `ERR_get_error'
    ::start()]+0x85):: undefined reference to `BIO_ctrl_pending'
    Debug\obj\main.o:: In function `main':
    C:\Documents and Settings\U502136\Mes documents\C++\asiosslserver\main.cpp:158: undefined reference to `BIO_write'
    C:\Documents and Settings\U502136\Mes documents\C++\asiosslserver\main.cpp:158: undefined reference to `BIO_test_flags'
    Debug\obj\main.o:: In function `ZN5boost4asio6detail23reactive_socket_serviceINS0_2ip3tcpENS1_14select_reactorILb0EEEE16shutdown_serviceEv':
    int)]+0x1a):: undefined reference to `BIO_ctrl_pending'
    int)]+0x97):: undefined reference to `BIO_read'
    Debug\obj\main.o:: In function `main':
    C:\Documents and Settings\U502136\Mes documents\C++\asiosslserver\main.cpp:150: undefined reference to `BIO_test_flags'
    Debug\obj\main.o:: In function `ZN5boost4asio6detail23reactive_socket_serviceINS0_2ip3tcpENS1_14select_reactorILb0EEEE16shutdown_serviceEv':
    ::do_init::~do_init()]+0x44):: undefined reference to `CRYPTO_set_locking_callback'
    ::do_init::~do_init()]+0x49):: undefined reference to `ERR_free_strings'
    ::do_init::~do_init()]+0x55):: undefined reference to `ERR_remove_state'
    ::do_init::~do_init()]+0x5a):: undefined reference to `EVP_cleanup'
    ::do_init::~do_init()]+0x5f):: undefined reference to `CRYPTO_cleanup_all_ex_data'
    ::do_init::~do_init()]+0x6b):: undefined reference to `CONF_modules_unload'
    ::do_init::~do_init()]+0x70):: undefined reference to `ENGINE_cleanup'
    unsigned int)]+0x6b):: undefined reference to `BIO_write'
    unsigned int)]+0xad):: undefined reference to `BIO_test_flags'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x2c):: undefined reference to `sk_num'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x6a):: undefined reference to `ERR_put_error'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0xaa):: undefined reference to `ERR_put_error'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x11a):: undefined reference to `ERR_put_error'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x172):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x193):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1b2):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1d3):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x245):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x25b):: undefined reference to `lh_retrieve'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x270):: undefined reference to `CRYPTO_lock'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x2d4):: undefined reference to `X509_VERIFY_PARAM_set_purpose'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x2f1):: undefined reference to `X509_VERIFY_PARAM_set_purpose'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x314):: undefined reference to `X509_VERIFY_PARAM_set_trust'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x331):: undefined reference to `X509_VERIFY_PARAM_set_trust'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x36d):: undefined reference to `BIO_free_all'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x395):: undefined reference to `BIO_free_all'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x3f9):: undefined reference to `BIO_find_type'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x40f):: undefined reference to `BIO_ctrl'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x439):: undefined reference to `BIO_find_type'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x44f):: undefined reference to `BIO_ctrl'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x479):: undefined reference to `BIO_find_type'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x48f):: undefined reference to `BIO_ctrl'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x4ab):: undefined reference to `BIO_s_socket'
    C:\openssl\lib\libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x4b3):: undefined reference to `BIO_new'
    :: More errors follow but not being shown.
    :: Edit the max errors limit in compiler options...
    :: === Build finished: 50 errors, 2 warnings ===
    Lorsque je recherche ces symboles, je ne les trouve dans aucune librairie que l'on me recommande d'utiliser dans la documentation (de OpenSSL). Lorsque je cherche l'un de ces symboles dans les-dites librairies, je trouve des symboles dont le nom est proche mais différent, souvent préfixés de "_".
    Où ai-je pu faire une erreur?

    ps: J'utilise la version 0.3.8rc3 de asio et la version 0.9.8e de openssl, sous Windows XP, avec mingw et gcc 3.4.5, sur un Pentium 4.
    Ancien membre du projet "Le Dernier Âge".

  2. #2
    Membre éclairé
    Avatar de Floréal
    Profil pro
    Inscrit en
    Novembre 2004
    Messages
    456
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France

    Informations forums :
    Inscription : Novembre 2004
    Messages : 456
    Points : 849
    Points
    849
    Par défaut
    J'ai fais quelques recherches. Il semble que sous windows, lorsqu'on lie les librairies libcrypto.a et libssl.a (et certainement leurs homologues dynamiques), il faille également lier libgdi32.a. Ce n'était pas dans les FAQ ni dans le manuel d'installation d'OpenSSL, j'ai trouvé ça en galèrant un peu, jusqu'à ce que je m'aperçoive que OpenSSL avait utilisé cette librairie, pour compiler ses exécutables.

    C'est donc un problème résolu.
    Ancien membre du projet "Le Dernier Âge".

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Choix] Boost::Asio ou OpenSSL
    Par Raz-X dans le forum Bibliothèques
    Réponses: 2
    Dernier message: 26/07/2011, 11h10
  2. Boost::Asio et Visual C++ Express 2005
    Par TocTocKiéLà? dans le forum Boost
    Réponses: 11
    Dernier message: 30/12/2007, 21h11
  3. socket ssl & boost::asio
    Par kass28 dans le forum Boost
    Réponses: 0
    Dernier message: 16/10/2007, 09h38
  4. Boost::Asio et code::blocks
    Par TocTocKiéLà? dans le forum Boost
    Réponses: 10
    Dernier message: 10/08/2007, 23h20
  5. Boost::asio : multi threading ou pas?
    Par Alp dans le forum Boost
    Réponses: 9
    Dernier message: 02/09/2006, 22h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo