Help building a boost asios ssl example

I worked on asio ssl examples (see below). Despite my best efforts, I could not associate openssl with the boost example. The conclusion from ld is that ld is missing characters from libssl.a. What I cannot understand is that I found all the symbols in libssl.a with nm that ld is talking about. I suspect I'm doing something dumb, but I'm not familiar enough with C ++ to fix this. I also included my makefile. The ssl-client.cpp source is shorthand from the link.

http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/example/ssl/client.cpp

INCLUDES = -I /usr/local/boost_1_41_0/ -I /opt/local/include/
LIBS = -L/usr/local/boost_1_41_0/lib/libboost_system.a \
-L/opt/local/lib/libcrypto.a \
-L/opt/local/lib/libssl.a

CPP = g++

build: ssl-client

ssl-client: ssl-client.cpp
    $(CPP) $(LIBS) $(INCLUDES) ssl-client.cpp
+3
source share
1 answer

, , -L. -L . , -L "lib" :

LIBS = -L/usr/local/boost_1_41_0/lib -L/opt/local/lib \
    -lboost_system -lcrypto -lssl

, -I include path . , , , :

INCLUDES = -I/usr/local/boost_1_41_0/ -I/opt/local/include/

, , LIBS, LIB. g++ :

$(CPP) $(LIBS) $(INCLUDES) ssl-client.cpp
+4

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


All Articles