开发者

Link external libraries portably?

I've got a .dll file created in VC++ 2008 that needs to be widely distributed, but also requires external resources (namely Open开发者_如何学CSSL libraries) to operate. The dll compiles and runs perfectly well on my own system, as well as any other system with the appropriate external libraries manually installed on them, but I need for the .dll itself to contain all necessary data itself.

At present the external resources are linked via

#pragma comment(lib, "libeay32.lib")
#pragma comment(lib, "ssleay32.lib")
#pragma comment(lib, "Ws2_32.lib")

and that's not quite cutting it. Is there a way to have all of this included in the dll?


Include OpenSSL DLLs with your distribution, or link your DLL with static OpenSSL libraries. From their INSTALL.W32:

...
You can also build a static version of the library using the Makefile ms\nt.mak
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜