linux libssl.so.10,linux - 应用程序需要libssl.so.10 => /usr/lib64/libssl.so.10 - 堆栈内存溢出...

我有一个应用程序,通过这样做:

export LD_LIBRARY_PATH=/this/is/another/folder

ldd myApp

// ...

libssl.so.10 => /usr/lib64/libssl.so.10

// ...

第一个问题:为什么myApp在libssl.so.10上显式链接? 当我在openssl文件夹中时(不应该与libssl.so链接?):

/usr/lib64/libssl3.so

/usr/lib64/libssl.so -> libssl.so.1.0.1e

/usr/lib64/libssl.so.10 -> libssl.so.1.0.1e

/usr/lib64/libssl.so.1.0.1e

第二个问题:为什么它会在/ usr / lib64中出现openssl lib而不是/ this /是/ another / folder中的那个?

两个信息: strace on my exec给了我(这清楚地表明它试图在我的文件夹中加载libssl.so.10但不在那里它不应该像我期望链接到libssl.so):

open("/this/is/another/folder/libssl.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/usr/lib64/libssl.so.10", O_RDONLY) = 3

我的执行官的精灵是:

0x0000000000000001 (NEEDED) Shared library: [libssl.so.10]

更新主要的makefile部分:

SRC = myApp.cpp

TARGET = myApp

INCLUDE = -I/my/open/ssl/path/include

LINK = -L/my/open/ssl/path/libs -lssl -lcrypto

CFLAGS = -MMD -MP -c -std=c++0x

all: $(TARGET)

$(TARGET): $(SRC)

$(CXX) -o $(TARGET) $(SRC) $(LINK)

任何帮助表示赞赏!

卡斯帕

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值