SVN Update and Ogre 1.4RC1

23 views
Skip to first unread message

Andy Miller

unread,
Feb 14, 2007, 5:48:59 PM2/14/07
to python-ogre...@googlegroups.com
SVN updated - additional changes to generate_code - expect this to be fluid over the next few days..
 
Note that my focus over the next few weeks is to ensure we are ready with a 1.0 release that matches the final release of the Ogre 1.4 SDK..
 
With this in mind the Python-Ogre SVN will (:)) build against the OgreSDK (CVS version should also be fine) - hence you won't have any problems determining the Ogre source version you need :) 
 
I intend to release a 0.9 windows binary early next week (once we sort out the iterators etc)
 
And I'll probably tweak the code generation to automatically remove 'static const' variables that are 'set' in the header file as I think this is the major Linux patch requirement, and the variables in question don't look critical (to me).
 
Also does anyone have knowledge on the 'Factory' classes and wether they should be exposed or not??  While many seem to expose OK I'm not certain they are useable (certain 'critical' variables are exposed but can't be overridden from Python, hence you can't really make a new subclass from the Factory class...)
 
Cheers
Andy

Game_Ender

unread,
Feb 15, 2007, 12:27:41 PM2/15/07
to Python Ogre Developers
If you want to do some serious customization of Ogre I think you need
to use the factories. This allows you to properly integrate you own
movable objects, archives format etc. They are really need for a
complete game to be made. What kind of testing needs to be done?

Roman Yakovenko

unread,
Feb 15, 2007, 12:48:51 PM2/15/07
to python-ogre...@googlegroups.com
On 2/15/07, Game_Ender <jli...@gmail.com> wrote:
>
> If you want to do some serious customization of Ogre I think you need
> to use the factories. This allows you to properly integrate you own
> movable objects, archives format etc. They are really need for a
> complete game to be made. What kind of testing needs to be done?

There is small problem with Ogre MovableObject and other class hierarchies
and their factories.

class MovableObject{
...
public:
virtual const String& getName(void) const { return mName; }
};

The Ogre developers made some very strange thing here: virtual function
return type is reference. Thus they force implementation on derived classes,
instead of behavior. Every derived class should keep std::string
variable, which
will hold the class ( type ) name. Obviously, for classes defined and
implemented
in Python could not hold such variable. There are few possible solutions to such
problem, but at first can somebody explain me why the function is virtual?

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/

Game_Ender

unread,
Feb 15, 2007, 1:14:08 PM2/15/07
to Python Ogre Developers
I believe string references are returned for speed reasons, ie not
intermediate copies are made. The getName method is virtual because
basically every other public method in the class is virtual as well.
Is there no way for Boost.Python to handler the returned reference?
Can a wrapper function which converts a python string to a std::string
be created that then returns that reference? The references aren't
stored anywhere they are just passed around.

-Joe

Patrick Mullen

unread,
Feb 15, 2007, 1:05:07 PM2/15/07
to python-ogre...@googlegroups.com
Hi, I'm trying to compile on linux, finally, it's going to be a long battle but I'm impatient and compiling things is kind of fun :)  I seem to be missing common_utils/var_checker.  I'm still in the generate_code.py stage, going up against the various libraries.  In the cases where I don't have missing common_utils or have to fix a lowercase/uppercase problem in environment.py, I am getting '__builtin_ctzl undeclared', so I assume that it's either not finding one of the dependencies, or I didn't install them right.  It doesn't look like it has to do with the static consts that var_checker is supposed to fix.

Game_Ender

unread,
Feb 15, 2007, 4:23:50 PM2/15/07
to Python Ogre Developers
Can you post the full error please? I am plan on building the lastest
Python-Ogre this weekend so I should be able to help through any
errors.

Patrick Mullen

unread,
Feb 15, 2007, 5:44:55 PM2/15/07
to python-ogre...@googlegroups.com
Thank you, it turned out to be a problem with gccxml - I had it installed both through gentoo portage as well as from running the gccxml_install I got from the pyplusplus site; and in PythonConfig_posix I was pointing to the gentoo version :)

Unfortunately, before I figured this out I tried reinstalling gccxml and managed to blow away my /usr/local/share directory because I wasn't sure what the installer meant by "where do you want to install it".  So I am going through and installing all of the dependancies again.

The var_checker problem looks to me like someone forgot to run "svn add" :)

Traceback (most recent call last):
  File "generate_code.py", line 28, in ?
    import common_utils.var_checker as varchecker
ImportError: No module named var_checker

And sure enough, var_checker isn't in common_utils or in the __init__.py

I'll let you know if I run into any issues after I finish rebuilding my system :)

For further reference, it's probably safest to skip the gccxml_install.py and just grab the cvs version and install it manually.

On 2/15/07, Game_Ender <jli...@gmail.com> wrote:

Patrick Mullen

unread,
Feb 15, 2007, 7:23:00 PM2/15/07
to python-ogre...@googlegroups.com
Ok, continuing with my linux compilation experiment, I am now able to build a few things, such as newton and cegui, and unable to build others.  Most important would be ogre, I am getting "exception" undeclared error:

============================
INFO gccxml cmd: /usr/local/bin/gccxml  -I"/root/python-ogre/python-ogre" -I"/usr/include" -I"/root/python-ogre/ogrenew/OgreMain/include"  -D"OGRE_NONCLIENT_BUILD" -D"OGRE_VERSION_1.4"  "/root/python-ogre/python-ogre/code_generators/ogre/python_ogre.h" -fxml="/root/python-ogre/python-ogre/code_generators/cache/ogre_1.4_cache.xml"
Traceback (most recent call last):
  File "generate_code.py", line 570, in ?
    generate_code()
  File "generate_code.py", line 452, in generate_code
    , indexing_suite_version=2
  File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 87, in __init__
    , indexing_suite_version)
  File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 118, in __parse_declarations
    decls = reader.read_files( files, compilation_mode )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 225, in read_files
    return self.__parse_file_by_file(files)
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 262, in __parse_file_by_file
    reader.create_xml_file( header, prj_file.cached_source_file )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py", line 195, in create_xml_file
    raise error
pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /root/python-ogre/python-ogre/code_generators/ogre/python_ogre.h:42:
/root/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h: In
   function `void python_ogre::details::instantiate()':
/root/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:28: error: `
   exception' undeclared (first use this function)
/root/python-ogre/python-ogre/code_generators/ogre/python_ogre_sizeof.h:28: error: (Each
   undeclared identifier is reported only once for each function it appears
   in.)
=====================
I'm not sure where exception is supposed to be coming from, so I don't know which package is to blame. 

Mike Handverger

unread,
Feb 15, 2007, 8:08:18 PM2/15/07
to Python Ogre Developers
I usually just comment that line out in python_ogre_sizeof.h. It
hasn't caused any badness for me.

Thanks,

Mike

Andy Miller

unread,
Feb 15, 2007, 8:13:02 PM2/15/07
to python-ogre...@googlegroups.com
I'm going to wrap that line as it works in VC7 but not in VC8 or (obviously) under unix
 
You need also to use the Python_ogre SVN rev # 184 - I've adding the missing common untils file in rev #186 but you also need an update to Py++ which hasn't made it yet...
 
I'll send this through in a seperate email..
 
Cheers (and sorry....)
 
Andy

 
Reply all
Reply to author
Forward
0 new messages