I also kind of feel that we need to export lib1 as well, as you may not
know what lib2 does with what it gets from lib1 (passing objects around
for instance). So certainly at least some part of lib1 need to be
exported.
For sure lib2 might forward to some lib1 symbols.
Not sure what might accidentally require linkage.

I don't agree if that statement. If you have three libs. lib1, lib2 and
lib3. And lib2 and lib3 link statically against lib1 you are going to
get linker errors because both lib2 and lib3 contain the symbols of lib1.

A: Why do two DLLs which export the same symbols cause linker errors? Because the corresponding import libraries contain the same symbols? B: You shouldn't mix static with dynamic linking, ODR issues are what you get in return.
C: What would happen if you statically link against lib2 and lib3?

Reply via email to