Posted 15 May 2008 - 06:22 PM
[Edited by - makdaddy_98102 on May 16, 2008 9:59:36 PM]
[THIS PROBLEM WAS DUE TO NOT USING THE STANDARD DIRECTX INSTALLER IN THE SDK'S REDIST FOLDER, AND INSTEAD TRYING TO DISTRIBUTE INDIVIDUAL .DLLS MANUALLY. THANKS FOR THE HELP.]
I am building a game using DirectX. I'm running Windows Vista and using Visual C++ 2008 Express Edition. I downloaded the Aug 2007 DirectX SDK and I'm using the Direct9 APIs. I'm basing my code on the "Textures" sample project included withe the sdk (which is a devstudio 7.1 project that got automatically upgraded to devstudio 9 by vc 2008 express). The game makes some meshes, does some texturing, applies some matrix transformations. Nothing fancy.
The game builds and runs fine on Vista. When I send the .exe file, along with the files d3d9.dll and d3dx9_35.dll to my friend who's running xp, as soon as he starts it he gets an error:
"The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll"
I sent my friend the source code (the devstudio 9 .sln, the .vcproj, and the c++ and .h files) and he downloaded the same Aug 2007 sdk and built that same project on xp (although with Visual Studio Professional 2008, not Express 2008 like me), and it works without giving that error when it runs on xp.
So what's going on?
I did some reading and ran Dependency Walker on my .exe. I understand that msvcrt.dll is an operating-system-specific file, and it's fine if the vista version has a function that the xp version doesn't. Dependency Walker does indeed show that _except_handler4_common is referenced by some module that is referenced by my executable, but as far as I can tell it's only referenced indirectly by other system dlls (i.e., vista-specific dlls), not by my code directly and not by d3dx9_35.dll directly. So I can't understand who's referencing it, and why it works when built on xp.
Any help appreciated.