poco netssl dll依赖项

poco netssl dll依赖项,dll,mono,dllimport,poco-libraries,msys2,Dll,Mono,Dllimport,Poco Libraries,Msys2,我正在构建一个dll,以使用PocoNetSSL通过HTTPS端点获取一些数据。我需要通过运行旧版本Mono的Unity中的C#调用该dll 我正在使用mingw-w64 shell构建我的dll。有一个通过PackageManagerPacman提供的Poco库包,我正在使用它 $ pacman -Qs 'poco' local/mingw-w64-x86_64-poco 1.6.0-2 POrtable COmponents C++ Libraries (mingw-w64) 我可

我正在构建一个dll,以使用PocoNetSSL通过HTTPS端点获取一些数据。我需要通过运行旧版本Mono的Unity中的C#调用该dll

我正在使用mingw-w64 shell构建我的dll。有一个通过PackageManagerPacman提供的Poco库包,我正在使用它

$ pacman -Qs 'poco'
local/mingw-w64-x86_64-poco 1.6.0-2
    POrtable COmponents C++ Libraries (mingw-w64)
我可以构建一个可执行文件,它可以很好地构建和运行https端点。我已经在某处安装了openssl,或者它可能已经随mingw一起安装

我的问题是无法使用LoadLibrary打开dll。我得到一个空指针,我猜这是一个依赖性问题。这是我的构建命令和dependency walker的快照。这里有我遗漏的东西吗。我想我应该能做到,但也许不行

sburke@sburke-pc MINGW64 ~/sandbox/hitaws
$ scons
scons: Reading SConscript files ...
msys
scons: done reading SConscript files.
scons: Building targets ...
g++ -o gdoaws.os -c -Wall -DPOCO_WIN32_UTF8 -I/mingw64/include gdoaws.cpp
g++ -o gdoaws.dll -Wl,-no-undefined -shared -Wl,--out-implib=libgdoaws.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive gdoaws.os -Wl,--no-whole-archive -L/mingw64/lib -lPocoNetSSL.dll -lPocoNet.dll -lPocoUtil.dll -lPocoFoundation.dll
scons: done building targets.

假设加载动态库代码是正确的,那么您的应用程序很可能尝试加载不同版本的
openssl
dll,而不是根据
Poco
构建的

msys2
中,您可以通过以下方式检查动态库依赖项:

ldd/mingw64/bin/libPocoNetSSL.dll

这取决于:

LIBEAY32.dll => /mingw64/bin/LIBEAY32.dll 
SSLEAY32.dll => /mingw64/bin/SSLEAY32.dll
这就是你在dependency walker中看到的吗

解决此问题的最佳方法是将上述DLL复制到可执行文件所在的文件夹中,并始终将其与软件一起分发