未定义的引用链接OpenSSL的时候t1sl_steup_key_block [英] Undefined reference to t1sl_steup_key_block when linking OpenSSL

查看:2417
本文介绍了未定义的引用链接OpenSSL的时候t1sl_steup_key_block的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了一个OpenSSL库链接到现有项目的问题。
凡我弄错了吗?

下面是我遵循的步骤。

我已经下载了SSL库,配置和安装它。它被安装在的/ usr /本地/ SSL

2)我抄 libcrypto.a libssl.a 的/ usr /本地/ SSL / lib目录到我的项目,像的/ mnt / Linux的/ BLA / BLA / lib目录

3)然后我的libssl编辑的make文件,并添加路径libcrpto那里。添加的路径是一个是项目如的/ mnt / Linux的/ BLA / BLA

3)使

4)通过光滑的编辑构建项目

当它建立我弄了半天错误链,像

  ../的lib / libssl.a(t1_enc.o):在函数't1sl_steup_key_block:未定义参考

现在,我想.a文件复制到项目可能是问题。是否有任何替代为或者我应该使用 LN -S 链接.a文件形成的/ usr /本地/ OpenSSL的/ lib目录到我的项目库文件夹?下面是错误。

 调试/ FC5 / m2pa.o -ldl -lpthread -ltdapi ../septel/gctlib.lib ../lib/libpq.a ../asn1/lib/libasn1per。一个../mysql/lib/libmysqlclient.a -L ../ lib目录../asn1/lib/libasn1rt.a -lm -lcrypt -lcrypto -lssl -rdynamic
../lib/libssl.a(ssl_lib.o):在功能`SSL_set_quiet_shutdown':ssl_lib.c :(文字+ 0x670):`SSL_set_quiet_shutdown的多个定义
../mysql/lib/libmysqlclient.a(ssl.o):ssl.cpp:(.text+0x125c):首先这里定义
在/ usr /斌/劳工处:警告:大小符号`SSL_set_quiet_shutdown从../mysql/lib/libmysqlclient.a(ssl.o 45)../lib/libssl.a(ssl_lib.o改为12)
../lib/libssl.a(ssl_lib.o):在功能`SSL_get_quiet_shutdown':ssl_lib.c :(文字+ 0x680):`SSL_get_quiet_shutdown的多个定义
../mysql/lib/libmysqlclient.a(ssl.o):ssl.cpp:(.text+0x12down在../mysql/lib/libmysqlclient.a(ssl.o从35更改)到8英寸。 /lib/libssl.a(ssl_lib.o)
../lib/libssl.a(ssl_err2.o):在功能`SSL_load_error_strings':ssl_err2.c :(文字+为0x4):未定义的参考`ERR_load_crypto_strings
../lib/libssl.a(ssl_algs.o):在功能`SSL_library_init':ssl_algs.c :(文字+为0x4):未定义的参考`EVP_des_cbc
:ssl_algs.c :(文字+位于0xC):未定义的参考`EVP_add_cipher
:ssl_algs.c :(文字+ 0×11):未定义的参考`EVP_des_ede3_cbc
:ssl_algs.c :(文字+的0x19):未定义的参考`EVP_add_cipher
:ssl_algs.c :(文字+ 0X1E):未定义的参考`EVP_idea_cbc


解决方案

您是否尝试过使用已安装在/ usr / lib目录的的libssl和libcrypto(假设你已经安装了开发包两者)?一旦编译和使用默认安装的无错误运行,你可以建立你的libssl新/ libcrypto(?)从源代码,安装到USR /本地,并使用图书馆的USR /本地版本重建。

I got a problem of linking an OpenSSL library into an existing project. Where I do get it wrong?

Below are the steps I have followed.

I have downloaded the SSL library, configured and installed it. It gets installed in /usr/local/ssl.

2) I have copied libcrypto.a and libssl.a from /usr/local/ssl/lib into my project, something like /mnt/linux/bla/bla/lib.

3) Then I edit the make file and added path of libssl libcrpto there. The path added is one that is in project like /mnt/linux/bla /bla

3) make

4) build project via slick edit

When it builds I get a long error chain, like

../lib/libssl.a(t1_enc.o) :In function 't1sl_steup_key_block: undefined ref

Now, I guess copying .a files into project could be problem. Is there is any alternative for that or should I use ln -s to link .a files form /usr/local/openssl/lib into my project library folder? Below is the error.

   Debug/FC5/m2pa.o  -ldl -lpthread -ltdapi ../septel/gctlib.lib ../lib/libpq.a ../asn1/lib/libasn1per.a ../mysql/lib/libmysqlclient.a     -L../lib ../asn1/lib/libasn1rt.a -lm -lcrypt -lcrypto -lssl  -rdynamic
../lib/libssl.a(ssl_lib.o): In function `SSL_set_quiet_shutdown':ssl_lib.c:(.text+0x670): multiple definition of `SSL_set_quiet_shutdown'
../mysql/lib/libmysqlclient.a(ssl.o):ssl.cpp:(.text+0x125c): first defined here
/usr/bin/ld: Warning: size of symbol `SSL_set_quiet_shutdown' changed from 45 in ../mysql/lib/libmysqlclient.a(ssl.o) to 12 in ../lib/libssl.a(ssl_lib.o)
../lib/libssl.a(ssl_lib.o): In function `SSL_get_quiet_shutdown':ssl_lib.c:(.text+0x680): multiple definition of `SSL_get_quiet_shutdown'
../mysql/lib/libmysqlclient.a(ssl.o):ssl.cpp:(.text+0x12down' changed from 35 in ../mysql/lib/libmysqlclient.a(ssl.o) to 8 in ../lib/libssl.a(ssl_lib.o)
../lib/libssl.a(ssl_err2.o): In function `SSL_load_error_strings':ssl_err2.c:(.text+0x4): undefined reference to `ERR_load_crypto_strings'
../lib/libssl.a(ssl_algs.o): In function `SSL_library_init':ssl_algs.c:(.text+0x4): undefined reference to `EVP_des_cbc'
:ssl_algs.c:(.text+0xc): undefined reference to `EVP_add_cipher'
:ssl_algs.c:(.text+0x11): undefined reference to `EVP_des_ede3_cbc'
:ssl_algs.c:(.text+0x19): undefined reference to `EVP_add_cipher'
:ssl_algs.c:(.text+0x1e): undefined reference to `EVP_idea_cbc'

解决方案

Have you tried using the libssl and libcrypto already installed in your /usr/lib directory (assuming you've installed the dev packages for both)? Once that compiles and runs without error using the default install, you can build your new libssl/libcrypto(?) from source, install to usr/local, and rebuild using the usr/local versions of the libraries.

这篇关于未定义的引用链接OpenSSL的时候t1sl_steup_key_block的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆