Pyogre 1.2 on Debian

mrkissinger

01-06-2006 01:26:21

I tried to compile pyogre from svn on debian.
SWIG ran OK. But gcc compilation failed.
Can anyone help?

# swig -c++ -python -modern $(pkg-config --cflags-only-I OGRE) \
> pyogre/ogre/ogre.i
/usr/local/include/OGRE/OgreCommon.h:268: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreVertexIndexData.h:189: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreRenderQueueSortingGrouping.h:47: Warning(314): pass is a python keyword, symbol will be renamed as '_pass'
/usr/local/include/OGRE/OgreFileSystem.h:106: Warning(402): Base class 'ArchiveFactory' is incomplete.
/usr/local/include/OGRE/OgrePrerequisites.h:189: Warning(402): Only forward declaration 'ArchiveFactory' was found.
/usr/local/include/OGRE/OgreRectangle2D.h:41: Warning(401): Base class 'SimpleRenderable' undefined.
/usr/local/include/OGRE/OgreSimpleRenderable.h:38: Warning(401): 'SimpleRenderable' must be defined before it is used as a base class.
/usr/local/include/OGRE/OgreRibbonTrail.h:62: Warning(401): Nothing known about base class 'Node::Listener'. Ignored.
/usr/local/include/OGRE/OgreTextureUnitState.h:296: Warning(509): Overloaded setCubicTextureName(Ogre::String const *const) is shadowed by setCubicTextureName(Ogre::String const &) at /usr/local/include/OGRE/OgreTextureUnitState.h:248.
/usr/local/include/OGRE/OgreTextureUnitState.h:248: Warning(509): Overloaded setCubicTextureName(Ogre::String const &,bool) is shadowed by setCubicTextureName(Ogre::String const *const,bool) at /usr/local/include/OGRE/OgreTextureUnitState.h:296.
/usr/local/include/OGRE/OgreTextureUnitState.h:342: Warning(509): Overloaded setAnimatedTextureName(Ogre::String const *const,unsigned int) is shadowed by setAnimatedTextureName(Ogre::String const &,unsigned int) at /usr/local/include/OGRE/OgreTextureUnitState.h:319.
/usr/local/include/OGRE/OgreTextureUnitState.h:319: Warning(509): Overloaded setAnimatedTextureName(Ogre::String const &,unsigned int,Ogre::Real) is shadowed by setAnimatedTextureName(Ogre::String const *const,unsigned int,Ogre::Real) at /usr/local/include/OGRE/OgreTextureUnitState.h:342.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgreTargetManager.h:59: Warning(473): Returning a pointer or reference in a director method is not recommended.


# gcc -shared -fpic -DPIC $(pkg-config --cflags --libs OGRE) \
> -I/usr/include/python2.4 -o pyogre/ogre/_ogre.so \
> pyogre/ogre/ogre_wrap.cxx
pyogre/ogre/ogre_wrap.cxx: In function 'Ogre::ushort Ogre_GpuProgram_numberPosesIncluded_get(Ogre::GpuProgram*)':
pyogre/ogre/ogre_wrap.cxx:6728: error: use of 'ushort' is ambiguous
/usr/include/sys/types.h:152: error: first declared as 'typedef short unsigned int ushort' here
/usr/local/include/OGRE/OgrePrerequisites.h:133: error: also declared as 'typedef short unsigned int Ogre::ushort' here
pyogre/ogre/ogre_wrap.cxx:6728: error: 'ushort' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx: In function 'Ogre::Matrix4& Ogre_Bone_bindingPoseInverseTransform_get(Ogre::Bone*)':
pyogre/ogre/ogre_wrap.cxx:8419: error: 'class Ogre::Bone' has no member named '_getBindingPoseInverseTransform'
pyogre/ogre/ogre_wrap.cxx: In member function 'const Ogre::String& CompTextureDefinition::getName()':
pyogre/ogre/ogre_wrap.cxx:9359: warning: returning reference to temporary
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_MeshManager_createBezierPatch__SWIG_6(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:153924: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_MeshManager_createBezierPatch__SWIG_7(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:154020: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx:154020: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_PatchMesh_define__SWIG_6(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:162713: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_PatchMesh_define__SWIG_7(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:162776: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx:162776: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_SceneManager_getSkyPlaneGenParameters(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:224272: error: 'SkyPlaneGenParameters' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:224272: error: 'result' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:224291: error: expected `;' before 'const'
pyogre/ogre/ogre_wrap.cxx:224292: error: expected primary-expression before ')' token
pyogre/ogre/ogre_wrap.cxx:224292: error: '_result_ref' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_SceneManager_getSkyBoxGenParameters(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:224936: error: 'SkyBoxGenParameters' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:224936: error: 'result' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:224955: error: expected `;' before 'const'
pyogre/ogre/ogre_wrap.cxx:224956: error: expected primary-expression before ')' token
pyogre/ogre/ogre_wrap.cxx:224956: error: '_result_ref' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_SceneManager_getSkyDomeGenParameters(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:226530: error: 'SkyDomeGenParameters' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:226530: error: 'result' was not declared in this scope
pyogre/ogre/ogre_wrap.cxx:226549: error: expected `;' before 'const'
pyogre/ogre/ogre_wrap.cxx:226550: error: expected primary-expression before ')' token
pyogre/ogre/ogre_wrap.cxx:226550: error: '_result_ref' was not declared in this scope
#

dermont

01-06-2006 01:33:11

Yep my fault I made some changes on gcc/mingw and didn't check the linux compilation, check the last page of this thread:
http://www.ogre3d.org/phpBB2addons/view ... 7&start=60

mrkissinger

01-06-2006 02:22:32

I followed what you said, but failed again.

Solomon:/backup/Softwares/ogre/dev-1.2.0# python setup.py build
running build
running build_ext
building 'pyogre._ogre' extension
swigging pyogre/ogre/ogre.i to pyogre/ogre/ogre_wrap.cxx
swig -python -c++ -modern -Ipyogre/ogre -I/usr/local/include -I/usr/local/include/OGRE -o pyogre/ogre/ogre_wrap.cxx -outdir pyogre pyogre/ogre/ogre.i
/usr/local/include/OGRE/OgreCommon.h:268: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreVertexIndexData.h:189: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreFont.h:355: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreRenderQueueSortingGrouping.h:47: Warning(314): pass is a python keyword, symbol will be renamed as '_pass'
/usr/local/include/OGRE/OgreFileSystem.h:106: Warning(402): Base class 'ArchiveFactory' is incomplete.
/usr/local/include/OGRE/OgrePrerequisites.h:189: Warning(402): Only forward declaration 'ArchiveFactory' was found.
/usr/local/include/OGRE/OgreRibbonTrail.h:62: Warning(401): Nothing known about base class 'Node::Listener'. Ignored.
:0: Warning(490): Fragment 'SWIG_Traits_std_pair_Sl_unsigned_SS_long_Sc_Ogre_SharedPtr_Sl_Ogre_Resource_Sg__Sg_' not found.
:0: Warning(490): Fragment 'SWIG_Traits_std_pair_Sl_std_string_Sc_Ogre_AnimationState_Sm__Sg_' not found.
pyogre/ogre/OgreSkeleton.i:25: Warning(509): Overloaded getAnimation(Ogre::String const &) const is shadowed by getAnimation(Ogre::String const &) const at /usr/local/include/OGRE/OgreSkeleton.h:210.
pyogre/ogre/OgreSkeletonInstance.i:15: Warning(509): Overloaded getAnimation(Ogre::String const &) const is shadowed by getAnimation(Ogre::String const &) const at /usr/local/include/OGRE/OgreSkeletonInstance.h:71.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgreTargetManager.h:59: Warning(473): Returning a pointer or reference in a director method is not recommended.
creating build
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/pyogre
creating build/temp.linux-i686-2.4/pyogre/ogre
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/ogre_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o
gcc: : 没有那个文件或目录
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pyogre/ogre/ogre_wrap.cxx:7115:33: error: TextureUnitStateExt.h: 没有那个文件或目录
pyogre/ogre/ogre_wrap.cxx: In function 'int Real_To_Tuple(const Ogre::Real*, PyObject*, int)':
pyogre/ogre/ogre_wrap.cxx:3400: warning: unused variable 'toReturn'
interrupted
Solomon:/backup/Softwares/ogre/dev-1.2.0# gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC -I/usr/local/include -I/usr/local/include/OGRE -I/usr/include/python2.4 -Ipyogre/ogre -c pyogre/ogre/ogre_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o

pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_MeshManager_createBezierPatch__SWIG_6(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:177235: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_MeshManager_createBezierPatch__SWIG_7(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:177331: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx:177331: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_PatchMesh_define__SWIG_6(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:185440: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'PyObject* _wrap_PatchMesh_define__SWIG_7(PyObject*, PyObject*)':
pyogre/ogre/ogre_wrap.cxx:185503: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx:185503: warning: converting negative value 'AUTO_LEVEL' to 'size_t'
pyogre/ogre/ogre_wrap.cxx: In function 'bool swig::check(PyObject*) [with Type = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]':
pyogre/ogre/ogre_wrap.cxx:4775: instantiated from 'bool swig::PySequence_Cont<T>::check(bool) const [with T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4824: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >, T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = long unsigned int, T = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >]'
pyogre/ogre/ogre_wrap.cxx:97740: instantiated from here
pyogre/ogre/ogre_wrap.cxx:4033: error: no type named 'category' in 'struct swig::traits<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >'
pyogre/ogre/ogre_wrap.cxx: In function 'bool swig::check(PyObject*) [with Type = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]':
pyogre/ogre/ogre_wrap.cxx:4775: instantiated from 'bool swig::PySequence_Cont<T>::check(bool) const [with T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4824: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >, T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = Ogre::AnimationState*]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >]'
pyogre/ogre/ogre_wrap.cxx:162865: instantiated from here
pyogre/ogre/ogre_wrap.cxx:4033: error: no type named 'category' in 'struct swig::traits<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >'
pyogre/ogre/ogre_wrap.cxx: In function 'const char* swig::type_name() [with Type = long unsigned int]':
pyogre/ogre/ogre_wrap.cxx:3820: instantiated from 'static swig_type_info* swig::traits_info<Type>::type_info() [with Type = long unsigned int]'
pyogre/ogre/ogre_wrap.cxx:3827: instantiated from 'swig_type_info* swig::type_info() [with Type = long unsigned int]'
pyogre/ogre/ogre_wrap.cxx:3861: instantiated from 'static PyObject* swig::traits_from_ptr<Type>::from(Type*, int) [with Type = long unsigned int]'
pyogre/ogre/ogre_wrap.cxx:3867: instantiated from 'static PyObject* swig::traits_from<Type>::from(const Type&) [with Type = long unsigned int]'
pyogre/ogre/ogre_wrap.cxx:3879: instantiated from 'PyObject* swig::from(const Type&) [with Type = long unsigned int]'
pyogre/ogre/ogre_wrap.cxx:6902: instantiated from here
pyogre/ogre/ogre_wrap.cxx:3810: error: 'type_name' is not a member of 'swig::traits<long unsigned int>'
pyogre/ogre/ogre_wrap.cxx: In function 'const char* swig::type_name() [with Type = Ogre::SharedPtr<Ogre::Resource>]':
pyogre/ogre/ogre_wrap.cxx:3820: instantiated from 'static swig_type_info* swig::traits_info<Type>::type_info() [with Type = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3827: instantiated from 'swig_type_info* swig::type_info() [with Type = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3861: instantiated from 'static PyObject* swig::traits_from_ptr<Type>::from(Type*, int) [with Type = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3867: instantiated from 'static PyObject* swig::traits_from<Type>::from(const Type&) [with Type = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3879: instantiated from 'PyObject* swig::from(const Type&) [with Type = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:6919: instantiated from here
pyogre/ogre/ogre_wrap.cxx:3810: error: 'type_name' is not a member of 'swig::traits<Ogre::SharedPtr<Ogre::Resource> >'
pyogre/ogre/ogre_wrap.cxx: In function 'Type swig::as(PyObject*, bool) [with Type = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]':
pyogre/ogre/ogre_wrap.cxx:4575: instantiated from 'swig::PySequence_Ref<T>::operator T() const [with T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4635: instantiated from 'swig::PySequence_ArrowProxy<T> swig::PySequence_InputIterator<T, Reference>::operator->() const [with T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >, Reference = const swig::PySequence_Ref<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >]'
pyogre/ogre/ogre_wrap.cxx:4885: instantiated from 'void swig::assign(const PySeq&, std::map<K, T, std::less<K>, std::allocator<std::pair<const K, T> > >*) [with PySeq = swig::PySequence_Cont<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >, K = long unsigned int, T = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:4820: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >, T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = long unsigned int, T = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >]'
pyogre/ogre/ogre_wrap.cxx:97740: instantiated from here
pyogre/ogre/ogre_wrap.cxx:4012: error: no type named 'category' in 'struct swig::traits<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >'
pyogre/ogre/ogre_wrap.cxx: In function 'const char* swig::type_name() [with Type = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]':
pyogre/ogre/ogre_wrap.cxx:4580: instantiated from 'swig::PySequence_Ref<T>::operator T() const [with T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4635: instantiated from 'swig::PySequence_ArrowProxy<T> swig::PySequence_InputIterator<T, Reference>::operator->() const [with T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >, Reference = const swig::PySequence_Ref<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >]'
pyogre/ogre/ogre_wrap.cxx:4885: instantiated from 'void swig::assign(const PySeq&, std::map<K, T, std::less<K>, std::allocator<std::pair<const K, T> > >*) [with PySeq = swig::PySequence_Cont<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >, K = long unsigned int, T = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:4820: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >, T = std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> >]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = long unsigned int, T = Ogre::SharedPtr<Ogre::Resource>]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<long unsigned int, Ogre::SharedPtr<Ogre::Resource>, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, Ogre::SharedPtr<Ogre::Resource> > > >]'
pyogre/ogre/ogre_wrap.cxx:97740: instantiated from here
pyogre/ogre/ogre_wrap.cxx:3810: error: 'type_name' is not a member of 'swig::traits<std::pair<long unsigned int, Ogre::SharedPtr<Ogre::Resource> > >'
pyogre/ogre/ogre_wrap.cxx: In function 'Type swig::as(PyObject*, bool) [with Type = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]':
pyogre/ogre/ogre_wrap.cxx:4575: instantiated from 'swig::PySequence_Ref<T>::operator T() const [with T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4635: instantiated from 'swig::PySequence_ArrowProxy<T> swig::PySequence_InputIterator<T, Reference>::operator->() const [with T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>, Reference = const swig::PySequence_Ref<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >]'
pyogre/ogre/ogre_wrap.cxx:4885: instantiated from 'void swig::assign(const PySeq&, std::map<K, T, std::less<K>, std::allocator<std::pair<const K, T> > >*) [with PySeq = swig::PySequence_Cont<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >, K = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = Ogre::AnimationState*]'
pyogre/ogre/ogre_wrap.cxx:4820: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >, T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = Ogre::AnimationState*]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >]'
pyogre/ogre/ogre_wrap.cxx:162865: instantiated from here
pyogre/ogre/ogre_wrap.cxx:4012: error: no type named 'category' in 'struct swig::traits<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >'
pyogre/ogre/ogre_wrap.cxx: In function 'const char* swig::type_name() [with Type = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]':
pyogre/ogre/ogre_wrap.cxx:4580: instantiated from 'swig::PySequence_Ref<T>::operator T() const [with T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4635: instantiated from 'swig::PySequence_ArrowProxy<T> swig::PySequence_InputIterator<T, Reference>::operator->() const [with T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>, Reference = const swig::PySequence_Ref<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >]'
pyogre/ogre/ogre_wrap.cxx:4885: instantiated from 'void swig::assign(const PySeq&, std::map<K, T, std::less<K>, std::allocator<std::pair<const K, T> > >*) [with PySeq = swig::PySequence_Cont<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >, K = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = Ogre::AnimationState*]'
pyogre/ogre/ogre_wrap.cxx:4820: instantiated from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(PyObject*, Seq**) [with Seq = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >, T = std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*>]'
pyogre/ogre/ogre_wrap.cxx:4896: instantiated from 'static int swig::traits_asptr<std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > > >::asptr(PyObject*, std::map<K, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >**) [with K = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, T = Ogre::AnimationState*]'
pyogre/ogre/ogre_wrap.cxx:3904: instantiated from 'int swig::asptr(PyObject*, Type**) [with Type = std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> > >]'
pyogre/ogre/ogre_wrap.cxx:162865: instantiated from here
pyogre/ogre/ogre_wrap.cxx:3810: error: 'type_name' is not a member of 'swig::traits<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Ogre::AnimationState*> >'
Solomon:/backup/Softwares/ogre/dev-1.2.0#

dermont

01-06-2006 03:05:15

Ok I was able to reproduce your problem using swig 1.3.27. Try upgrading to swig version 1.3.29.

mrkissinger

01-06-2006 08:31:38

It works now. Thanks.
But on Debian, you must compile .so file manually. Some ".la" file must be linked by "libtool gcc ...".

mrkissinger

01-06-2006 10:47:01

Seems the demos under "ogre" dir work fine. But the demos under "cegui" dir report errors.

Solomon:/backup/Softwares/ogre/dev-1.2.0/demos/cegui# python MenuDemo.py
Traceback (most recent call last):
File "MenuDemo.py", line 38, in ?
from pyogre import ogre,cegui
File "/usr/lib/python2.4/site-packages/pyogre/cegui.py", line 4, in ?
import _cegui
ImportError: /usr/lib/python2.4/site-packages/pyogre/_cegui.so: undefined symbol: _ZTIN5CEGUI14OpenGLRendererE
Solomon:/backup/Softwares/ogre/dev-1.2.0/demos/cegui#

dermont

01-06-2006 13:53:28

What version of Cegui are you using i.e. source , apt package etc. Looks like CEGUIOpenGLRenderer is not being picked up during the compilation.
I put some defines in cegui.i to allow disabling either the OpenGLRenderer / CEGUIOgreRenderer or both. Maybe something dodgy I did, but everyhing works fine here, I'll double check.

Also:

a) check if libCEGUIOpenGLRenderer.so is in your path.
b) Do a ldd /usr/lib/python2.4/site-packages/pyogre/_cegui.so and check libCEGUIOpenGLRenderer.so.0's a dependency.

c) check in /usr/local/lib/pkgconfig or wherever your package config files are kept (may be /usr/lib/pkgconfig on deb) for CEGUI-OPENGL.pc:

- Someone else had a problem with the CEGUIOpenGLRenderer. You don't need it for Ogre, to remove edit your setup.py as in here:
:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=1219

, and in cegui.i
#define WRAP_OPENGL_GUIRENDERER
//#define WRAP_OPENGL_GUIRENDERER

reswig and recompile cegui.

d) Failing that try LD_PRELOAD as in the demos below.


Note not all the cegui demos have been updated. There are problems loading Look/Falgard libraries. As a workaround fog implemented a hack to compile against the TaharezLook/Windows(Look)/Falgard. See the CEGUI-OGRE-PYTHON.pc.in in the main pyogre dir. TaharezLook is the default which means basically you can have to update CEGUI-OGRE-PYTHON.pc.in and recompile cegui if you want run either Windows(Look) or Falgard.

A workaround is shown below, just make sure if your doing so to run in a separate shell to avoid any problems.

Update Demos as follows:


- VanillaBackgroundDemo.py , DebugConsoleDemo.py , DragnDropDemo.py , RenderToTextureDemo.py
TabControlDemo.py

#self.guiRenderer = cegui.OgreCEGUIRenderer(self.renderWindow)
self.guiRenderer = cegui.OgreCEGUIRenderer(self.renderWindow,ogre.RENDER_QUEUE_OVERLAY, False, self.sceneManager)


- RenderToTextureDemo.py fails have to check on that

- LayoutCreationDemo.py , ManualCreationDemo.py , MultiColumnListBox6.py , WindowsBackgroundDemo.py , DragnDropDemo.py , WindowsBackgroundDemo.py

from pyogre import ogre,cegui
#import ogre
#import cegui
#import ogre,cegui


To Run:

Windows Look Demos

- WindowsBackgroundDemo.py
- DebugConsoleDemo.py
- MultiColumnListBox6.py
- TabControlDemo.py

export LD_PRELOAD=/usr/local/lib/libCEGUIBase.so.0:/usr/local/lib/libCEGUIWindowsLook.so.0
python <demoname>.py

Falgard Based Demos
- VanillaBackgroundDemo.py

export LD_PRELOAD=/usr/local/lib/libCEGUIBase.so.0:/usr/local/lib/libCEGUIFalagardBase.so.0
python <demoname>.py

TaharezLook Look Demos

- DragnDropDemo.py
- RenderToTextureDemo.py
- ManualCreationDemo.py

export LD_PRELOAD=/usr/local/lib/libCEGUIBase.so.0:/usr/local/lib/libCEGUITaharezLook.so.0
python <demoname>.py


I'll try and patch / update the linux readme with this at the weekend.

mrkissinger

02-06-2006 10:19:50

I recompiled cegui by cegui_mk2-source-0.4.1.tar.bz2 from cegui official site, the pycegui works now!

But, I found some points to be pay your attentions:

1. The resources.cfg file.
I must add these lines manually:

FileSystem=../media/gui/datafiles/schemes
FileSystem=../media/gui/datafiles/imagesets
FileSystem=../media/gui/datafiles/layouts
FileSystem=../media/gui/datafiles/looknfeel
FileSystem=../media/gui/datafiles/fonts


2. I must make a symbol link from $pyogre/demo/media/gui/datafiles to $pyogre/demo/ , or it will complain missing some files.

3. Demo files, I recommend to use Unix format, and add a "#!/usr/bin/python" in the first line.

4. Some demos do not work yet, such as:
- MenuDemo.py gives "segment fault"
- DragnDropDemo.py gives a black screen, or I did something wrong?
- Maybe others.

dermont

02-06-2006 11:29:04

1/2 Never had to to that. The lines you refer to are already in /demos/cegui/resources.cfg.


FileSystem=../media/gui/datafiles/fonts
FileSystem=../media/gui
FileSystem=../media/gui/datafiles
FileSystem=../media/gui/datafiles/schemes
FileSystem=../media/gui/datafiles/imagesets
FileSystem=../media/gui/datafiles/layouts
FileSystem=../media/gui/datafiles/looknfeel
FileSystem=layouts/


I just copy accross SampleFramework.py and run the demos from demos/cegui. The only problem I can see is that facial.layout is in demos/cegui whereas it should be in demos/cegui/layout.


4 Some demos do not work yet, such as:


  1. a) MenuDemo.py gives "segment fault":

    Did you follow the LD_PRELOAD method above for WindowsLook
    demo. What does your CEGUI.log say.

    b) DragnDropDemo.py gives a black screen, or I did something wrong?
    Yes you didn't make the changes indicated in the post above. To create a guiRenderer either:

    self.guiRenderer = cegui.OgreCEGUIRenderer(self.renderWindow,ogre.RENDER_QUEUE_OVERLAY, False, self.sceneManager)

    OR

    self.guiRenderer = cegui.OgreCEGUIRenderer(self.renderWindow)
    self.guiRenderer.setTargetSceneManager(self.sceneManager)



    c) Maybe Others:

    All demos except the RenderToTextureDemo.py work on my machine, unless I missed a step in the post above.
    [/list:u]


    Edit:
    Also BTW if your using the facial animation demo and probably some of the other ogre demos you may need to create your own media directory, by copying across Ogre's Samples\Media to media and replacing the gui subdir with pyCegui's gui subdir.

mrkissinger

03-06-2006 20:32:52

Thanks for reply, I will try these later.
So far, pyogre works well in my own OSM viewer. Thanks twice!

dermont

03-06-2006 20:45:15

You're welcome. I've submitted this patch as a means of a workaround for
the LD_PRELOAD / recompile nonsense. It means using the Falgard Look Skins and you still have to statically compile against the FalgardBase, but at least you can run any of the demos without LD_PRELOAD.

You should post more details about your OSM viewer, I'm sure that others would be interested.

SuperElectric

29-09-2006 02:31:42

I finally got pyogre 1.2.0 to build and install with ogre 1.2.3, but when I try to run any of the demos, I get the following:

$ python CelShadingDemo.py
Traceback (most recent call last):
File "CelShadingDemo.py", line 2, in ?
from pyogre import ogre
File "/usr/lib/python2.4/site-packages/pyogre/ogre.py", line 4, in ?
import _ogre
ImportError: libOgreMain.so.12: cannot open shared object file: No such file or directory


libOgreMain.so.12 is definitely there in /usr/local/lib/. Could anybody suggest things to try?

I'm using Ubuntu Dapper with ogre 1.2.3 and SWIG 1.3.29

-- Matt

dermont

29-09-2006 05:07:26

sudo ldconfig