Andreas Halm wrote:
> I have a compiler problem with the following class structure and no idea
> where to look for the error:
> 
> <FieldContainer
>       name="Type1"
>       parent="FieldContainer"
>       library="MyLib"
>       pointerfieldtypes="both"
>       structure="concrete"
>       systemcomponent="false"
>       parentsystemcomponent="true"
>       decoratable="false"
>       isNodeCore="false">
> 
>       Some Fields following here ... some floats, some strings, nothing
> special
> 
> </FieldContainer>
> 
> As long as this type is not used inside another fcd type, all works fine. I
> can use the class in a normal std::vector without problems. However, as soon
> as I do this:
> 
> <FieldContainer
>       name="Type2"
>       parent="MaterialDrawable"
>       library="MyLib"
>       pointerfieldtypes="both"
>       structure="concrete"
>       systemcomponent="false"
>       parentsystemcomponent="true"
>       decoratable="false"
>       isNodeCore="true"
>       additionalPriorityIncludes="GL/glew.h">
> 
>       <Field
>               name="var"
>               category="pointer"
>               type="Type1"
>               typeHeader="OSGType1.h"
>               fieldHeader="OSGType1Fields.h"
>               cardinality="multi"
>               visibility="external"
>               access="public">
>               This won't work
>       </Field -->
               ^^^^^^
typo? should be </Field>

>   
> </FieldContainer>
> 
> I get the following unresolved external and no idea where to look for the
> problem (vc9):
> 
> 3>bb-osg.lib(OSGResidueBase.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class OSG::FieldContainer * __thiscall
> OSG::PointerMFieldBase::operator[](unsigned int)const "
> (__imp_??apointermfieldb...@osg@@qbepavfieldcontai...@1@i...@z) referenced in
> function "public: virtual void __thiscall OSG::EditFCPtrMFieldHandle<class
> OSG::PointerMField<class OSG::Atom *,struct OSG::UnrecordedRefCountPolicy,0>
>> ::shareValues(class boost::shared_ptr<class OSG::GetFieldHandle>)const "
> (?shareval...@?$editfcptrmfieldhandle@v?$pointermfi...@pavatom@OSG@@UUnrecor
> dedrefcountpol...@2@$0A@@OSG@@@OSG@@ubexv?$shared_...@vgetfieldhandle@OSG@@@
> boost@@@Z)
> 
> The operator is defined, but inline, so I have no idea what the problem is.

is Type1 == OSG::Atom and Type2 == OSGResidue here? [1]
Is there an  #include "OSGAtom.h" in OSGResidue.h?
The non-base files are usually only generated the very first time, if 
you later add fields that point to other containers (e.g. to Atom) you 
need to manually add an include - or regenerated the non-base files, but 
that *destroys all changes* you made to them.

        Cheers,
                Carsten

[1] if not I'm confused how the error relates to the .fcd snippets from 
above...

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to