The problem with building up the Boost and ssl client server on Linux

I installed boost as the third library when installing pcl (Cloud Cloud Library).

Now I am trying to run client and server programs http://www.boost.org/doc/libs/1_57_0/doc/html/boost_asio/example/cpp03/ssl/client.cpp

When trying to link the required libraries:

g++ -I /usr/include/boost/ server.cpp -o server -lboost_system -lssl -lpthread 

The following error appears:

/usr/bin/ld:/tmp/ccRbD849.o: undefined reference to the character 'ERR_reason_error_string @@ OPENSSL_1.0.0' // lib / x 86_64-linux-gnu / libcrypto.so.1.0.0: characters with errors added: DSO is missing from collect2 command line: error: ld returned 1 exit status

When I searched for the usr folder, the Boost folder exists only inside the include subfolder.

What can I do to solve this problem.

+5
source share
1 answer

[...] libcrypto.so: [...] DSO is not on the command line

spells! You are lacking

 -lcrypto 

on the linker command line. In fact, I always use -lssl -lcrypto in tandem

+9
source

Source: https://habr.com/ru/post/1215584/


All Articles