Robert Osfield | 3 Sep 2007 15:30
Picon

Re: Inventor Writer

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@...> 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.
>

Gmane