开发者

add two dll's to msvc 2010 application

开发者 https://www.devze.com 2023-02-01 02:49 出处:网络
I\'m trying to use libcurl library in my application. when i start my application, it asks for libcurl.dll and zlib1.dll

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

精彩评论

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

关注公众号