[SOLVED] ImportError: DLL load failed

nick.cash

10-06-2007 19:53:07

I just discovered Python-Ogre today and decided to play around with it, as I have a project I was about to start with Pygame but Ogre looks like it will do more of what I want with less hassle.

Anyway, I can't get a single one of the demos to run. Everything gives me this error:
Traceback (most recent call last):
File "C:\PythonOgre\demos\ogre\Demo_Smoke.py", line 12, in -toplevel-
import ogre.renderer.OGRE as ogre
File "C:\Python24\lib\site-packages\ogre\renderer\OGRE\__init__.py", line 6, in -toplevel-
from _ogre_ import *
ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

(although with slightly different Traceback info, of course, but it's always the line "import ogre.renderer.OGRE as ogre" that sets it off)

This is on Windows XP, using Python-Ogre 1.0 RC2.

I used the installer, so it installed the Visual C runtime library as well as updated DirectX.

I had Python 2.5 installed, but I haven't used it in months so I figured something was wrong with my installation, so I uninstalled everything and reinstalled it. Same problem.

So I uninstalled all of that and tried it again with 2.4. Still the same.

I made sure I had the absolutely latest version of the VC runtime, and installed the .NET 3.0 runtimes as well, just because.

I even tried moving all of the dlls to the system32 folder on the off-chance my paths are acting screwy and windows just couldn't find them.

I'm at a loss here. What else could I be missing?

Brad

10-06-2007 20:44:35

I won't swear to it, but I'm going to say that your VC runtime files did not install properly. I had a similar message on systems that did not have the VC runtime environment. You can usually obtain these through vcredist_x86.exe which is actually packaged and automatically ran with Python-Ogre 1.0 RC2, but I did find that on some machines this setup program does nothing but open and promptly close without doing anything.

If this be the case, there are several solutions to manually putting a .manifest file in your folder among several runtime DLLs, although for the life of me I cannot recall the exact process. Googling or searching on these forums with your error message might yield more detailed results.

nick.cash

10-06-2007 21:17:27

You're right, watching more closely I can now see that vcredist_x86.exe appears to close without warning before the installation is complete. (It's hard to tell, though, it might be finishing but I don't think so). Nothing I can do to it makes it do anything differently, though.

I did however, find this:
Visual C++ 2005 SP1 Redistributable Package (x86)
http://www.microsoft.com/downloads/deta ... laylang=en

which installed just fine and now everything works perfectly.

Since this appears to be a newer version of vcredist_x86.exe shouldn't it be packaged with Python-Ogre anyway?

andy

11-06-2007 00:44:19

<< New version is on sourceforge RC2c with the updated files >>

Thanks for finding the problem AND coming up with a solution...

It would seem that I perhaps had the redistributables already installed (via other programs) on all my test machines and only "thought" I was doing the right thing :)

I'm building a RC2(c) as we speak with the newer redist files and will update SourceForge

Thanks
Andy