Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
308 views
in Technique[技术] by (71.8m points)

c++ - Boost and ssl client server building issue on Linux

I have installed boost as a third library when I install pcl (Point 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

following error appears:

/usr/bin/ld: /tmp/ccRbD849.o: undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1.0.0' //lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

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

What can I do to solve this problem.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

[...] libcrypto.so: [...] DSO missing from command line

spells it out! You are missing

-lcrypto

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...