Two libraries 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?
Share
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.