Jump to content
  • Advertisement
Sign in to follow this  
Nyarlath

Indirect DLL loading conflict

This topic is 2221 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear all,
I am developing an application A which links to third party libraries B (B1.lib and B1.dll) and C (C.lib, C.dll and B2.dll). B1 and B2 are different versions of the same library and export functions with the same names.
The project compiles, links and starts, but I get runtime errors when I call functions declared in C. If I replace B1.dll with a copy of B2.dll (to verify that the wrong dll is being used), the calls of C are working, but obviously I get into trouble when I call functions of B1 directly.

Why is C using B1 when it has been compiled linking to B2? Is there a way to force C to call the functions of B2 instead of B1?

Many thanks

Share this post


Link to post
Share on other sites
Advertisement

Do B1.dll and B2.dll share the same file name?

No, they could not even, because they have to be located in the same folder as the application. If B2 is missing, the application refuse to start.
(This is puzzling me because renaming the libs was the panacea of dll problems.)

Share this post


Link to post
Share on other sites

Am I right when I suspect that when calling something in C you hand it something you created directly through B1?

No, they are called from unrelated code.

Looking at the modules loaded I have verified that both of the libraries are loaded, so I am now convinced that it is not a library loading problem, but a conflict between the two versions running in parallel. This is possible if they share some resources somewhere.

Many thanks for your interest.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!