开发者

add two dll's to msvc 2010 application

I'm trying to use libcurl library in my application. when i start my application, it asks for libcurl.dll and zlib1.dll to exist in the same folder. when i add them everything works fine but i want to include them to the executable.

add two dll's to msvc 2010 application

how can i statically add both dll's to the ap开发者_如何学编程plication?


You cannot statically link dlls into an executable. The purpose of dynamic libraries is to be loaded dynamically during runtime from an external image (dll file). You should check whether curl and zlib provide proper static libraries and link against them instead of lib stubs for the dlls.

Consider that linking against static external libraries makes your binary potentially vulnerable against any security issues in statically linked blobs. That means that you will have to update any binary you statically linked against those libraries instead of simply updating the libraries themselves.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜