Где взять файл reentrant.c?

аюсь скомпилировать простую программу ssl (она была взята из исходного кода книги openssl). В программе есть следующие файлы: common.h common.c client.c server.c

Я установил openssl 0.9.7, поэтому у меня та же версия с книгой. Я скачал исходный код и ./Configure, make, make test, make install в домашнем каталоге.

В common.h есть следующие элементы:

#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/ssl.h>
#include <openssl/x509v3.h> 

я бегуgcc -Wall common.c client.c -o клиент но я получаю следующие ошибки:

common.c: In function ‘init_OpenSSL’:
common.c:12:5: warning: implicit declaration of function ‘THREAD_setup’
/tmp/ccvI3HX4.o: In function `handle_error':
common.c:(.text+0x3a): undefined reference to `ERR_print_errors_fp'
/tmp/ccvI3HX4.o: In function `init_OpenSSL':
common.c:(.text+0x51): undefined reference to `THREAD_setup'
common.c:(.text+0x5a): undefined reference to `SSL_library_init'
common.c:(.text+0x97): undefined reference to `SSL_load_error_strings'
/tmp/ccRA0Co9.o: In function `do_client_loop':
client.c:(.text+0x71): undefined reference to `BIO_write'
/tmp/ccRA0Co9.o: In function `main':
client.c:(.text+0xbb): undefined reference to `BIO_new_connect'
client.c:(.text+0x106): undefined reference to `BIO_ctrl'
client.c:(.text+0x18e): undefined reference to `BIO_free'
collect2: ld returned 1 exit status

Очевидно, что он не может ссылаться на файлы заголовков ... Когда я запускаю, как предложено в одном форумеgcc -Wall common.c client.c -o client -lcrypto -lssl я получил

common.c: In function ‘init_OpenSSL’:
common.c:12:5: warning: implicit declaration of function ‘THREAD_setup’
/tmp/cc2gjx8W.o: In function `init_OpenSSL':
common.c:(.text+0x51): undefined reference to `THREAD_setup'
collect2: ld returned 1 exit status

Но добавление -lpthread не поможет решить проблему ...

Есть идеи, почему это происходит и как это решить?

Я предполагаю, что lcrypto и lssl установлены по умолчанию в ubuntu, и, выполнив -lcypto, говорит компоновщику, что нужно смотреть на системные заголовки, а не на установочные заголовки openssl ...

Любая помощь или указатели приветствуются!

Спасибо!

Ответы на вопрос(1)

Ваш ответ на вопрос