Hi Colin, I've merged and checked in your change to ReaderWriterOSG2.cpp, but have for now rejected the proposed change to ArrayDispatchers.cpp. I have rejected the proposed changes as I feel they are way too intrusive and awkward to justify workaround a warning on niche platform. To solve this warning one should either solve it properly or disable the warning for the compile of .cpp under Solaris. To solve this properly one might need to implement multiple entry points to the ArrayDispatcher that supports both C and C++ function pointers or change it so that only C function pointers are used.
Robert. On 5 January 2012 10:36, Colin McDonald <[email protected]> wrote: > Hi Robert, > > Attached are some fixes to build osg under Solaris, with the > Solaris Studio compiliers. > > src/osgPlugins/osg/ReaderWriterOSG2.cpp is simply a missing header for > use of strtoul etc. > > src/osg/ArrayDispatchers.cpp is more of a hack. The Solaris Studio > compilier C++ complier regards extern "C" function declarations as > different from C++ functions (even with the same arguments), because the > standard allows for the calling mechanism & linkage to be different, > although in practice they are the same. Whenever a C function (e.g. the > gl routines) is assigned to a C++ function pointer (or vice versa) in > osg this produces a warning message, which I have always ignored. But > the template expansion in ArrayDispatchers.cpp fails because matching > function types are not found. Adding some typedefs and type casts works > around the issue. > > Regards > > Colin McDonald > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
