On Tue, Jun 1, 2010 at 10:37 PM, Robert Osfield <[email protected]>wrote:

> Hi Tim,
>
> I've just do a make wrappers and attempted to build the wrappers (by
> enabling them via ccmake .) and have found lots of build errors
> associated with attempts to wrap the various ref_ptr<>'s that the OSG
> has.  The errors are of the form:
>
> [ 65%] Building CXX object
>
> src/osgWrappers/introspection/CMakeFiles/osgwrapper_osgVolume.dir/osgVolume/Locator.o
> /home/robert/OpenSceneGraph/include/osgIntrospection/ExtendedTypeInfo:
> In function ‘osgIntrospection::ExtendedTypeInfo extended_typeid()
> [with T = osg::observer_ptr<osgVolume::Locator::LocatorCallback>&]’:
>
> /home/robert/OpenSceneGraph/src/osgWrappers/introspection/osgVolume/Locator.cpp:199:
>  instantiated from here
>
...

> I've done a quick hack of adding an #include<osg/observer_ptr> into
> the problem src/osgWrappers/introspection/*/* files and this gets the
> build up an running once more, but... make wrappers (that invokes the
> genwrapper tool) doesn't know about how to do this.  I've had a quick
> look at the src/osgWrappers/introspection/genwrapper.conf file and had
> a try at getting it to insert the include for us, but as yet haven't
> been able to trick it into working.
>
> Do you have experience with genwrappers/introspection?  This error is
> rather a show stopper for building the OSG when wrappers are turned on
> as there are many instances of this problem now rearing it's head
> across the autogenerated wrappers.
>
> Here are my suggestions:
* Remove the new ref_ptr constructor. It's not being used anywhere except in
DatabasePager.cpp, and its use is not critical there. Seems a bit like the
tail wagging the dog to change the source code for the benefit of
genwrapper;
* Or, ignore type observer_ptr. This may not be what you want from
introspection;
* Or, make genwrapper include osg/ref_ptr and osg/observer_ptr in all the
generated files. This seems like the best solution to me. Normally I don't
like including gratuitous files all over the place, but these are generated
files we're talking about. This could either be hard-coded in
genwrapper/WrapperGenerator.cpp (simple, a hack) or be a new option in the
configuration file (more general and flexible, more programming).

Thoughts?
Tim
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to