PyOgre OSX


08-09-2006 15:57:15

Hi there,

I try to compile PyOgre for OSX.
After fixing some problems with the Script a run into a serios Problem with swig.

The script generates the WrapperFile, but there is something wrong with it.
When compiling with gcc (4.0.1) I get the message:

error: invalid cast from type "const Ogre::TextureUnitState::UVWAdressingMode" to type "Ogre::TextureUnitState::TextureAddressingMode"

the coresponding line in the ogre_wrap.cxx is
SWIGINTERN Ogre::TextureUnitState::TextureAddressingMode Ogre_TextureUnitState_textureAddressingMode_get(Ogre::TextureUnitState *self){ return (Ogre::TextureUnitState::TextureAddressingMode)(self->getTextureAddressingMode()); }

I use Python 2.4 und the Ogre Framework is from (based on the latest OGRE version 1.2.0 (Dagon)).

Maybe PyOgre doasn't work with the Dagon Version of Ogre?




08-09-2006 16:52:21

What version of pyogre are you using?

- branch/dev-1.2.0 and swig 1.3.29 for Ogre 1.2.0
- trunk and swig 1.3.27 for Ogre 1.0.6.

svn checkout ... /dev-1.2.0


11-09-2006 11:02:27

What version of pyogre are you using?

- branch/dev-1.2.0 and swig 1.3.29 for Ogre 1.2.0

I downloaded the dev-1.2.0 branch (my swig Version is 1.3.29 and the Ogre-Framework is 1.2.0).

No the compilation works better. It get ogre_wrap.o, VertexBufferProxy.o, IndexBufferProxy.o, EventSystem.o

It failed on swigging cegui.i to cegui_wrap.cxx. It doasn't find all the headerfiles (CEGUI*.h). They doas not seam to be part of the framework. But do I need the GUI stuff to build something usefull with pyogre?


By the way:
I still needed to fix the

First under OSX swig get's empty options, which doasn't work.
So in def swig_sources(...) I replaced

if ext.pkg_config_module:
pkg_config(ext.pkg_config_module, '--cflags-only-I'))


if ext.pkg_config_module :
theTemp = pkg_config(ext.pkg_config_module, '--cflags-only-I')
theArray = []
for theEntry in theArray :
if len(theEntry) :

Than the compiler needs to know the place of the Ogre-Framework headers, so I add my inludedirectory to the setup-Routine:

include_dirs = ["/Library/Frameworks/Ogre.framework/Headers"])

These are just hacks, I'm shure there is a more general way to fix this.
Maybe you can give that information to the developers...

thanks a lot



11-09-2006 12:35:01

I skip building the ext_cegui and install pyogre.

When calling one of the Testfiles he has problems:

File "", line 19, in ?
from helpers import *
File "/Users/sp/Desktop/root/tests/ogre/", line 26, in ?
from pyogre import ogre
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pyogre/", line 4, in ?
import _ogre
ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pyogre/ Symbol not found: __ZTIN4Ogre15StringInterfaceE
Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pyogre/
Expected in: dynamic lookup