[osg-submissions] Inventor Writer

Robert Osfield robert.osfield at gmail.com
Mon Sep 3 08:03:19 PDT 2007


Thanks John, build fix merged and submitted to SVN.  The changes work
fine on my build now without the code disable hack that I added.

W.r.t CMakeLists.txt file, my and the SVN version only had one entry
for each file, I can only presume that on svn update the duplication
was added, or something similar at your end.

On reviewing your code it was startling clear that you don't follow
the coding style that the rest of the Inventor plugin let alone the
rest of the OSG follow.  For others users this leads to rather a
"crunch" when trying to review code and follow whats going on.  I
don't know where you picked up some of your "style" - else at the end
of line being on particular one, but it is rather a road block for
long term maintenance.  Image if the whole OSG used different coding
styles, with over 270 contributors we'd end with ugly mess.
Thankfully most contributors just fit in, I'm afraid yours sit out on
their own.

I have tried automated programs that fix indenting etc, but alas I
haven't come across one that properly handles modern C++ yet, so
fixing contribution has to be done by hand...

Robert.





On 9/3/07, PCJohn <peciva at fit.vutbr.cz> wrote:
> Resolved!
> It also seems to compile on Linux.
> Just word of warning: Seems like you added some files to CMakeLists.txt
> that they are there two times. Attaching it once again.
>
> If something is still not working, just write me.
> Thanks for merging.
> John
>
>
> PCJohn napsal(a):
> > Seems, I have a solution.
> > I will just test it on Linux because MSVC does not exhibit the problem
> > in any case. Will be back with results in 30 minutes.
> > John
> >
> >
> >
> > Robert Osfield napsal(a):
> >> Hi John,
> >>
> >> I have gone ahead an merged the convert to inventor function but have
> >> been forced to optional compile out the problematic code as I could
> >> easily spot how to get the templates to compile under g++ 4.1.2.
> >> Perhaps you familiarity with the code might be able to spot a way of
> >> refactoring the code.
> >>
> >> I have placed a define DISABLE_PROBLEM_COMPILE_SECTIONS into CMakeLists.txt
> >> file and used this ConvertToInventor.cpp to avoid compiling problem
> >> code.  I have done this as I need to get the 2.1.9 dev release out the
> >> door.
> >>
> >> Robert.
> >>
> >> On 9/3/07, Robert Osfield <robert.osfield at gmail.com> wrote:
> >>> Hi John (Jan :-)
> >>>
> >>> I've just had a bash at merging your changes.  First of note is that
> >>> the plugin wasn't built against the SVN version or the 2.1.x series,
> >>> I've selected what parts of the recently changes weren't included in
> >>> your submission so hopefully will have resolved this issue - this
> >>> might haunt us though.
> >>>
> >>> Next up, and a but of show stopper right now,  when I compile
> >>> ConvertToInventor.cpp I get the follow errors:
> >>>
> >>>
> >>> [ 93%] Building CXX object
> >>> src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertToInventor.o
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:
> >>> In function 'bool applicateIntType(const osg::Array*, fieldClass&,
> >>> int, int, int) [with fieldClass = SoMFInt32, fieldItemType = int]':
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:316:
> >>>   instantiated from here
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:298:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFInt32&, int&,
> >>> int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:300:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFInt32&, int&,
> >>> int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:
> >>> In function 'bool applicateIntType(const osg::Array*, fieldClass&,
> >>> int, int, int) [with fieldClass = SoMFUInt32, fieldItemType = unsigned
> >>> int]':
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:317:
> >>>   instantiated from here
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:298:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFUInt32&,
> >>> int&, int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:300:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFUInt32&,
> >>> int&, int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:
> >>> In function 'bool applicateIntType(const osg::Array*, fieldClass&,
> >>> int, int, int) [with fieldClass = SoMFShort, fieldItemType = short
> >>> int]':
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:318:
> >>>   instantiated from here
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:298:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFShort&, int&,
> >>> int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:300:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFShort&, int&,
> >>> int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:
> >>> In function 'bool applicateIntType(const osg::Array*, fieldClass&,
> >>> int, int, int) [with fieldClass = SoMFUShort, fieldItemType = short
> >>> unsigned int]':
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:319:
> >>>   instantiated from here
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:298:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFUShort&,
> >>> int&, int&, int&)'
> >>> /home/robert/OpenSceneGraph/src/osgPlugins/Inventor/ConvertToInventor.cpp:300:
> >>> error: no matching function for call to
> >>> 'osgArray2ivMField_pack_template(const osg::Array*&, SoMFUShort&,
> >>> int&, int&, int&)'
> >>> make[2]: *** [src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/ConvertToInventor.o]
> >>> Error 1
> >>> make[1]: *** [src/osgPlugins/Inventor/CMakeFiles/osgdb_iv.dir/all] Error 2
> >>> make: *** [all] Error 2
> >>> robert at rannoch:~/OpenSceneGraph/src/osgPlugins/Inventor$ nc
> >>> ConvertToInventor.cpp
> >>>
> >>> My g++ version is:
> >>>
> >>> g++ --version
> >>> g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
> >>>
> >>> Could you make some suggestions on how to resolve this. Cheers,
> >>> Robert.
> >>>
> >> _______________________________________________
> >> osg-submissions mailing list
> >> osg-submissions at lists.openscenegraph.org
> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> > _______________________________________________
> > osg-submissions mailing list
> > osg-submissions at lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
>


More information about the osg-submissions mailing list