开发者

Compiling a library with external dependencies

Two librar开发者_如何学编程ies I use in my application both use zlib, which causes a conflict when linking my project. I want to compile these libraries without zlib; I want to statically link the zlib library in my own project and have this libraries use that instead. How can I do that?


If both libraries are statically linked to the executable and zlib is also statically linked to the executable, then you just build the two libraries without linking them against zlib and add zlib to the linker dependencies when building the executable.

If both libraries are DLLs then you need to check why you're exporting the zlib symbols from them - normally you should be able to just link two DLLs to an executable with both DLLs using overlapping dependencies and not run into an issues from the overlapping dependencies.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜