问题描述
我当前正在使用:
- OS X优胜美地10.10.5
- 最新的Indy(10.6.2.0,2016年3月13日下载-Indy10_5346.zip)
- 拉撒路1.4.4
- 最新的openssl
更具体地讲,OpenSSL:
OpenSSL is more specificly:
- openssl-1.0.2g相应于家庭酿造cmd线路接口
- 放在/usr/local/Cellar/openssl/1.0.2/lib/ 上面目录中的
- lib文件是: libcrypto.10.dylib,libcrypto.1.0.0.dylib,libcrypto.dylib,libcrypto.a,libssl.1.0.0.dylib,libssl.dylib,libssl.a
- openssl-1.0.2g accordingly to home brew cmd line interface
- placed in /usr/local/Cellar/openssl/1.0.2/lib/
- lib files in above directory are: libcrypto.10.dylib,libcrypto.1.0.0.dylib, libcrypto.dylib, libcrypto.a,libssl.1.0.0.dylib, libssl.dylib, libssl.a
...
我在使用Indy之前使用idOpenSSLSetLibPath()将pah传递给了Indy.
I am passing above pah to Indy using idOpenSSLSetLibPath() befoe using Indy.
但是我收到错误消息: EIdOSSLCouldNotLoadSSLLibrary 位于:
but I am getting getting error: EIdOSSLCouldNotLoadSSLLibrary at:
TIdSSLIOHandlerSocketOpenSSL.Init() -> TIdSSLContext.Create()
...
LoadOpenSSLLibrary() -> IdSSLOpenSSLHeaders.Load()
...
Load()
...
hIDCrypto := LoadSSLCryptoLibrary() -> Result := HModule(HackLoad(...))
...
Result := LoadLibrary(HackLoadFileName(ALibName,ALibVersions[I])); // always zero :(
评论
-
"GIdOpenSSLPath + SSLCLIB_DLL_name"正确(在"LoadLibrary"调用中使用"HackLoadFileName"时,Indy正确设置了文件扩展名)
"GIdOpenSSLPath + SSLCLIB_DLL_name are correct (file extension set correctly by Indy when using "HackLoadFileName" in "LoadLibrary" call)
Indy尝试迭代/加载以下名称: libcrypto,libcrypto.1.0.0,libcrypto.10,libcrypto.1.0.1,libcrypto.1.0.2
Indy tries to iterate/load over following names: libcrypto, libcrypto.1.0.0, libcrypto.10, libcrypto.1.0.1, libcrypto.1.0.2
...
侧面问题1:
- 为什么自制软件会在名为以下文件的文件中发送openssl 1.0.2g libcrypto.1.0.0.dylib -是否要最大限度地提高兼容性?
- why does homebrew ship openssl 1.0.2g in a file calledlibcrypto.1.0.0.dylib - is it to maximize compability?
...
关于可能原因1的思考:
这是否可能是Lazarus为OS X编译 32bit 的问题?而OpenSSL是 64位吗?
Could all this be an issue of Lazarus compiles 32bit for OS X? And OpenSSL is 64bit?
推荐答案
在命令行中像这样安装openssl:简单安装openssl --universal
Install openssl like this in command line: brew install openssl --universal
这确保该库可同时用于32位和64位应用程序.
This ensure the library works both for 32 and 64 bit apps.
您可能需要先使用以下工具进行卸载:brew brew opens openssl
You may need to uninstall first using: brew uninstall openssl
这篇关于Lazarus在OS X上使用Indy + OpenSSL导致EIdOSSLCouldNotLoadSSLLibrary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!