What is the origin of conflicts between libraries?

Asked

Viewed 37 times

1

I was studying static and dynamic libraries when I read that one of the main reasons for the use of dynamics is the occurrence of conflicts between static libraries, but what is the origin of these conflicts? If the question is too general, could you cite examples of situations that cause conflicts? I read about conflicts in an answer here on the site, in this link. In "DLL Choice Guide" is written "Statically linking two libraries is causing some conflict or difficulty and dynamically resolves."

1 answer

1


This is really rare and occurs only when the code has no form of namespace, even if informal (i.e., bad code). If you have two static libraries that have a similar symbol present in both of them you cannot link. In some cases it is possible to use this dynamically because the symbol present in the two Dlls may not be used at the same time, so it would work. Note that this is not a prevalent reason, nor is it a strongly adopted, I put in that reply to supplement information, but should not cling to it, the other reasons are much more important. And there are other ways to solve this in other ways, by improving the code, or by using a few tricks, I just gave you an option.

I believe that there are even some more specific cases dependent on the technology used, but I’ve never had and I can’t speak specifically.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.