Building PyOgre on Windows

srekel2

09-10-2005 14:46:09

Hey

I just wrote a guide on the wiki for how to build PyOgre on Windows.

Hmm. I just realized that there's something wrong.. I did this yesterday with Ogre 1.0.4 and it worked pretty good (just got a small texture problem), but now PyOgre just won't start at all. I get this error:


The procedure entry point
?_loadimages@Texture@Ogre@IEAXABV?$vector.... could not be located in the dynamic link library OgreMain.dll.


I wonder what went wrong. The pyogre version is from yesterday, so that shouldn't be a problem, I guess. I suppose I might have forgotten some step, but I don't think so, since I wrote the guide while I was doing everything. Can anyone read it over and see if I missed something? And/or do the steps yourself and see if you get the same thing.

http://www.ogre3d.org/wiki/index.php/Py ... gOnWindows

Oh, and this is the output from the program (the other error came in a popup window):


Creating resource group General
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
Loading library OgrePlatform.dll
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
DevIL version: Developer's Image Library (DevIL) 1.6.5
DevIL image formats: bmp dib cut dcx dds gif ico cur jpg jpe jpeg lif mdl mng jng pcx pic pix png pbm pgm pnm ppm psd pdd psp pxr sgi bw rgb rgba tga vda icb vst tif tiff wal xpm raw
Registering ResourceManager for type HighLevelGpuProgram
Loading library .\RenderSystem_Direct3D7
Traceback (most recent call last):
File "C:\temp\eclipsebra\workspace\ViolentWorld\src\GameApplication.py", line 141, in ?
runGame()
File "C:\temp\eclipsebra\workspace\ViolentWorld\src\GameApplication.py", line 122, in runGame
application.go()
File "C:\temp\eclipsebra\workspace\ViolentWorld\src\SampleFramework.py", line 27, in go
if not self._setUp():
File "C:\temp\eclipsebra\workspace\ViolentWorld\src\SampleFramework.py", line 39, in _setUp
self.root = ogre.Root("../configs/plugins.cfg")
File "C:\Python24\Lib\site-packages\pyogre\ogre.py", line 10544, in __init__
newobj = _ogre.new_Root(*args)
pyogre.ogre.ExceptionPtr: \temp\ogre-win32-v1-0-5\ogrenew\OgreMain\src\OgreDynLib.cpp(82): ogre error 9: Could not load dynamic library .\RenderSystem_Direct3D7. System Error: The specified procedure could not be found.

fog

09-10-2005 17:54:50

Did you build against 1.0.4 and are now running using 1.0.5 dlls?

srekel2

09-10-2005 19:24:29

Nope. Yesterday, I built against 1.0.4 (that's when I talked to you on IRC), but today I completely rebuilt everything as detailed in the article against 1.0.5.

At least, I HOPE so, lol. :) But I'm pretty sure that's what I did.

Clay

09-10-2005 21:15:38

This almost always is a problem with linking against one version of Ogre and putting the DLLs of another in the directory. I suggest completely cleaning your directory structure (all the intermediate .obj, all the .lib, and all the .dlls) and starting over. 1.0.5 works fine (I am using it right now). Also be sure you are not linking against debug and using release dlls (or vice versa).

srekel2

09-10-2005 22:28:19

Ok, I'll try that again tomorrow I guess.

By the way, when I ran the swig command a couple of months ago, it took all CPU and made my computer unusable while it was running (for at least half an hour, can't remember). But when I did it this time, it took perhaps a minute. I did it on another computer which is faster and I believe it has 1gb ram instead of 512 (which I have on mine). Is that the reason for the change, or have you made some change to PyOgre since then?

Clay

09-10-2005 22:41:31

By the way, when I ran the swig command a couple of months ago, it took all CPU and made my computer unusable while it was running (for at least half an hour, can't remember). But when I did it this time, it took perhaps a minute. I did it on another computer which is faster and I believe it has 1gb ram instead of 512 (which I have on mine). Is that the reason for the change, or have you made some change to PyOgre since then?
Yeah, that has been a problem. I fixed that about 2 hours ago. If you check out the latest version from SVN this should no longer occur.

srekel2

10-10-2005 12:01:11

I realized what I did wrong. It's really silly; I put the correct dlls and everything in the site-packages/pyogre folder, but I forgot that our game has its own set of dlls (we store them in a local folder so it's easier to distribute).

After that it seems to work, although I got the configfile problem described in the other thread. I'll try and fix that today by using ConfigObj instead (http://www.voidspace.org.uk/python/configobj.html).