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.