(I am a hobby programmer, so please for give me)
I have a problem with GCC compiler when using openssl libraries on Linux server.
When compiling a sample code,
gcc -o example example.c
I get the following error:
__________________________________________________
/tmp/ccNvoBF9.o: In function `main':
/tmp/ccNvoBF9.o(.text+0x177): undefined reference to `SSL_load_error_strings'
/tmp/ccNvoBF9.o(.text+0x17c): undefined reference to `SSL_library_init'
/tmp/ccNvoBF9.o(.text+0x184): undefined reference to `SSLv2_client_method'
/tmp/ccNvoBF9.o(.text+0x18c): undefined reference to `SSL_CTX_new'
/tmp/ccNvoBF9.o(.text+0x1a0): undefined reference to `SSL_new'
/tmp/ccNvoBF9.o(.text+0x1b8): undefined reference to `SSL_set_fd'
/tmp/ccNvoBF9.o(.text+0x1c7): undefined reference to `SSL_connect'
/tmp/ccNvoBF9.o(.text+0x1e1): undefined reference to `SSL_get_current_cipher'
/tmp/ccNvoBF9.o(.text+0x1ec): undefined reference to `SSL_CIPHER_get_name'
/tmp/ccNvoBF9.o(.text+0x20b): undefined reference to `SSL_get_peer_certificate'
/tmp/ccNvoBF9.o(.text+0x236): undefined reference to `X509_get_subject_name'
/tmp/ccNvoBF9.o(.text+0x241): undefined reference to `X509_NAME_oneline'
/tmp/ccNvoBF9.o(.text+0x270): undefined reference to `X509_get_issuer_name'
/tmp/ccNvoBF9.o(.text+0x27b): undefined reference to `X509_NAME_oneline'
/tmp/ccNvoBF9.o(.text+0x2a3): undefined reference to `X509_free'
/tmp/ccNvoBF9.o(.text+0x2f0): undefined reference to `SSL_write'
/tmp/ccNvoBF9.o(.text+0x318): undefined reference to `SSL_read'
/tmp/ccNvoBF9.o(.text+0x36c): undefined reference to `SSL_shutdown'
/tmp/ccNvoBF9.o(.text+0x38a): undefined reference to `SSL_free'
/tmp/ccNvoBF9.o(.text+0x399): undefined reference to `SSL_CTX_free'
_________________________________________________
I have checked that functions are found from libraries on the server. Libraries should be behind the correct path /usr/include/openssl
Can you advice me what could be a problem?
Thank you!