CentOS上编译myget时报SSL错误的解决办法

      今天在centos上编译myget,报下面的错误:

make  all-recursive
make[1]: Entering directory `/root/soft/myget-0.1.2'
Making all in src
make[2]: Entering directory `/root/soft/myget-0.1.2/src'
g++  -D_FILE_OFFSET_BITS=64   -o mytget  debug.o advio.o tcp.o url.o utils.o block.o header.o plugin.o proxy.o task.o http.o httpplugin.o ftp.o ftpparser.o ftpplugin.o downloader.o myget.o mytget.o progressbar.o  -lpthread
advio.o: In function `IOStream::write(char*, int, long)':
advio.cpp:(.text+0x709): undefined reference to `SSL_write'
advio.o: In function `IOStream::read(char*, int, long)':
advio.cpp:(.text+0x951): undefined reference to `SSL_read'
advio.cpp:(.text+0x983): undefined reference to `SSL_get_error'
advio.o: In function `IOStream::ssl_connect()':
advio.cpp:(.text+0xc8e): undefined reference to `SSL_connect'
advio.cpp:(.text+0xcb1): undefined reference to `SSL_get_error'
advio.o: In function `IOStream::set_fd(int)':
advio.cpp:(.text+0xd22): undefined reference to `SSL_set_fd'
advio.cpp:(.text+0xd30): undefined reference to `SSL_connect'
advio.cpp:(.text+0xd53): undefined reference to `SSL_get_error'
advio.o: In function `IOStream::set_use_ssl(bool)':
advio.cpp:(.text+0xdfb): undefined reference to `SSL_CTX_free'
advio.cpp:(.text+0xe00): undefined reference to `SSLv23_client_method'
advio.cpp:(.text+0xe08): undefined reference to `SSL_CTX_new'
advio.cpp:(.text+0xe1e): undefined reference to `SSL_new'
advio.cpp:(.text+0xe3d): undefined reference to `SSL_set_fd'
advio.cpp:(.text+0xe54): undefined reference to `SSL_shutdown'
advio.cpp:(.text+0xe84): undefined reference to `SSL_CTX_free'
advio.o: In function `IOStream::~IOStream()':
advio.cpp:(.text+0xea5): undefined reference to `SSL_shutdown'
advio.cpp:(.text+0xecb): undefined reference to `SSL_CTX_free'
advio.o: In function `IOStream::~IOStream()':
advio.cpp:(.text+0xef9): undefined reference to `SSL_shutdown'
advio.cpp:(.text+0xf1f): undefined reference to `SSL_CTX_free'
mytget.o: In function `main':
mytget.cpp:(.text+0x2db): undefined reference to `SSL_load_error_strings'
mytget.cpp:(.text+0x2e0): undefined reference to `SSL_library_init'
collect2: ld returned 1 exit status
make[2]: *** [mytget] Error 1
make[2]: Leaving directory `/root/soft/myget-0.1.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/soft/myget-0.1.2'
make: *** [all] Error 2

    然后我直接复制里面的g++编译语句,后面加上-lssl, 问题解决。

你可能感兴趣的:(develop)