I am getting a strange compile error(included at end of message) when
compiling the latest head of the repository of OSGBase.  These errors occur
in any code that includes OSGSField.ins,  OSGMField.ins,
OSGPointerMField.inl<https://github.com/vossg/OpenSGDevMaster/commit/66fd0bf44b8f01c910f942e3f64afc2e4d297719#diff-27>,
or 
OSGPointerMField.inl<https://github.com/vossg/OpenSGDevMaster/commit/66fd0bf44b8f01c910f942e3f64afc2e4d297719#diff-27>
.

The error indicates,as far as I can tell, that the typedef Self in SField
and MField is not defined in the function's namespace when attempting to
call:
FieldDescriptionBase *returnValue = new Self::Description(_fieldType,
                                                         szFieldname,
                                                         "",
                                                         0,
                                                         0,
                                                         false,
                                                         uiFieldFlags.
                                                         fEditMethod,
                                                         fGetMethod);

There are no compile errors if these calls are commented out.


This is very strange to me, because I commented out these calls, then added
temporary code that reference static members of SField and MField, this in
turn compiled with no errors.  Finally, I tried expanding all the typdefs in
Self::Description giving FieldDescription< FieldTraits<ValueT, iNamespace>,
FieldType::SingleField >.  This gave the following change:

FieldDescriptionBase *returnValue = new FieldDescription<
FieldTraits<ValueT, iNamespace>, FieldType::SingleField >(_fieldType,
                                                         szFieldname,
                                                         "",
                                                         0,
                                                         0,
                                                         false,
                                                         uiFieldFlags.
                                                         fEditMethod,
                                                         fGetMethod);

This change DID compile.

This error does not happen if I checkout the previous revision(r2519).


Setup:
  This is a clean clone from github commit:
b933758cabf0e0f5c915e43f5a4fadf70ef56beb<https://github.com/vossg/OpenSGDevMaster.git>
.
  Platform: Linux 2.6.18-194.17.1.el5
  Compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
  Cmake configuration: Debug, everything else were the default values.

I have also confirmed that I get the same error when compiling on OS X.

The following is the relevant error output:

/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createFieldDescription(const OSG::Char8*,
OSG::UInt32, OSG::EditFieldHandlePtr (OSG::ReflexiveContainer::*)(),
OSG::GetFieldHandlePtr (OSG::ReflexiveContainer::*)()const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:60:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:60:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:93:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:93:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createFieldDescription(const OSG::Char8*,
OSG::UInt32, OSG::EditFieldHandlePtr (OSG::ReflexiveContainer::*)(),
OSG::GetFieldHandlePtr (OSG::ReflexiveContainer::*)()const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:60:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:60:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:93:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:93:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)()const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:62:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:62:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:97:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:97:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)()const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:62:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:62:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const)’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:97:
error: expected type-specifier
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:97:
error: expected ‘,’ or ‘;’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createFieldDescription(const OSG::Char8*,
OSG::UInt32, OSG::EditFieldHandlePtr (OSG::ReflexiveContainer::*)(),
OSG::GetFieldHandlePtr (OSG::ReflexiveContainer::*)()const) [with ValueT =
OSG::OSGAny, int iNamespace = 0]’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:123:
instantiated from ‘OSG::FieldType OSG::SField<OSG::OSGAny, 0>::_fieldType’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGOSGAnyFields.cpp:51:
instantiated from here
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:60:
error: cannot convert ‘int*’ to ‘OSG::FieldDescriptionBase*’ in
initialization
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::SField<ValueT, iNamespace>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const) [with ValueT = OSG::OSGAny,
int iNamespace = 0]’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:123:
instantiated from ‘OSG::FieldType OSG::SField<OSG::OSGAny, 0>::_fieldType’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGOSGAnyFields.cpp:51:
instantiated from here
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGSField.ins:93:
error: cannot convert ‘int*’ to ‘OSG::FieldDescriptionBase*’ in
initialization
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)()const) [with ValueT = OSG::OSGAny, int
iNamespace = 0, AllocT = std::allocator<OSG::OSGAny>]’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:127:
instantiated from ‘OSG::FieldType OSG::MField<OSG::OSGAny, 0,
std::allocator<OSG::OSGAny> >::_fieldType’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGOSGAnyFields.cpp:52:
instantiated from here
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:62:
error: cannot convert ‘int*’ to ‘OSG::FieldDescriptionBase*’ in
initialization
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins: In
static member function ‘static OSG::FieldDescriptionBase*
OSG::MField<ValueT, iNamespace, AllocT>::createIdxFieldDescription(const
OSG::Char8*, OSG::UInt32, OSG::EditFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32), OSG::GetFieldHandlePtr
(OSG::ReflexiveContainer::*)(OSG::UInt32)const) [with ValueT = OSG::OSGAny,
int iNamespace = 0, AllocT = std::allocator<OSG::OSGAny>]’:
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:127:
instantiated from ‘OSG::FieldType OSG::MField<OSG::OSGAny, 0,
std::allocator<OSG::OSGAny> >::_fieldType’
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGOSGAnyFields.cpp:52:
instantiated from here
/home/users/dkabala/Test/OpenSGDevMaster/Source/Base/Field/OSGMField.ins:97:
error: cannot convert ‘int*’ to ‘OSG::FieldDescriptionBase*’ in
initialization
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to