Skip to main content
GameDev.net gamedev.net
🔒 Locked

weird problem with executable + dll

Started by marfr960 Sep 4, 2006 at 8:27 AM 3 replies 350+ views
Original Post
marfr960
marfr960
Hi all, I am stuck with a very weird problem. I coded a graphical tool composed by an executable and one DLL in MS VC++ 6.0 under Windows XP. In the DLL there are some functions and the resources (text files) used by the executable. Now, if I launch the debug version of the executable (linked with the debug version of the DLL) from outside the IDE, it runs fine. If I launch the release version of the executable (linked with the release version of the DLL), the application does not work properly, like if it does not find the resources. Ok, I realized that there is some bug in the release version of the DLL, infact if I link the release executable with the debug version of the DLL it works fine. The big weird problem is that if I launch the release executable + release DLL form _within_ the IDE, it works! As far as I know, there should be not a difference between the executable launched by windows explorer and the executable launched from within the IDE. Does anybody has some clue of the reason because this is happening? I am losing a good amount of my sanity for this... thanks a lot, marfr960
marfr960
marfr960
I agree that it could be something related with the path.

However, if the executable would not find the DLL, it would give me a run-time error (like "DLL not found").

I also checked if the executable is able to reach the resources into the release DLL and it seems that the resources are correctly accessed...
TheAdmiral
TheAdmiral
If your problem isn't fixed yet, try setting up a JIT debugger (MSVS works if you're using that, though I'd recommend OllyDbg). This way, you can attach a debugger at the moment an unhandled exception occurs.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
marfr960
marfr960
Thanks a lot for the suggestion!
I did not know about the existence of OllyDbg, it seems an interesting product.

I will try it out as soon as I can.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.