Is the static library associated with duplication twice?

I have a project that references both OpenCV and cvBlob, but cvBlob also references OpenCV. Both OpenCV and cvBlob are built as static libraries.

Does my executable file have 2 copies of all OpenCV functions that are used by both my code and cvBlob, or does the linker detect this and remove the redundancy?

cvBlob and my code link to the same OpenCV lib files.

+6
source share
1 answer

If both of them refer to the same .lib files, then in the final executable file there is only one copy.

+4
source

All Articles