Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Indirect DLL loading conflict

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 Nyarlath   Members   

104
Like
0Likes
Like

Posted 24 August 2012 - 06:39 AM

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

#2 SiCrane   Moderators   

11762
Like
2Likes
Like

Posted 24 August 2012 - 07:24 AM

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

#3 Nyarlath   Members   

104
Like
0Likes
Like

Posted 24 August 2012 - 07:38 AM

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.)

#4 BitMaster   Members   

8647
Like
1Likes
Like

Posted 24 August 2012 - 07:50 AM

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

#5 Nyarlath   Members   

104
Like
0Likes
Like

Posted 24 August 2012 - 08:54 AM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.