Hi,

I'm still working  on this but currently I have an odd problem involving 
template code generation.

Right now I can compile the ported classes but somehow the compiler 
doesn't seem to generate code for the SField template specialization. 
The linker complains about a missing external symbol:

"public: static class OSG::FieldType const & __cdecl OSG::SField<class 
OSG::OSGQGLWidget *,0>::getClassType(void)" 
(?getclasst...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@saabvfieldt...@2@XZ)" 
in Funktion ""protected: static void __cdecl 
OSG::QTWindowBase::classDescInserter(class OSG::FieldContainerType &)" 
(?classdescinser...@qtwindowbase@OSG@@kaxaavfieldcontainert...@2@@Z)".

What I tried (looking  how it was done in OpenSG 1.8) is including the 
following lines in OSGQT4WindowDataFielda.h right below the FieldTraits 
specializations:

#ifndef OSG_COMPILEWINDOWQTINST
extern template class OSG_WINDOWQTLIB_DLLMAPPING SField<OSGQGLWidgetP>;
extern template class OSG_WINDOWQTLIB_DLLMAPPING MField<OSGQGLWidgetP>;
#endif

This will end up in other missing external symbols though this seems to 
be the way it has been done in 1.8:

1>   Bibliothek 
"C:\src\lib\OpenSG2_current\build\bin\DebugRT\OSGWindowQT4_d.lib" und 
Objekt "C:\src\lib\OpenSG2_current\build\bin\DebugRT\OSGWindowQT4_d.exp" 
werden erstellt.
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: static class OSG::FieldType const & __cdecl 
OSG::SField<class OSG::OSGQGLWidget *,0>::getClassType(void)" 
(?getclasst...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@saabvfieldt...@2@XZ)" 
in Funktion ""protected: static void __cdecl 
OSG::QTWindowBase::classDescInserter(class OSG::FieldContainerType &)" 
(?classdescinser...@qtwindowbase@OSG@@kaxaavfieldcontainert...@2@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: unsigned int __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::getBinSize(void)const " 
(?getbins...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@QBEIXZ)" in 
Funktion ""public: virtual unsigned int __thiscall 
OSG::QTWindowBase::getBinSize(unsigned __int64)" 
(?getbins...@qtwindowbase@OSG@@uae...@z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::copyToBin(class OSG::ExceptionBinaryDataHandler 
&)const " 
(?copyto...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@qbexaavexceptionbinarydatahand...@2@@Z)"
 
in Funktion ""public: virtual void __thiscall 
OSG::QTWindowBase::copyToBin(class OSG::ExceptionBinaryDataHandler 
&,unsigned __int64)" 
(?copyto...@qtwindowbase@OSG@@uaexaavexceptionbinarydatahand...@2@_...@z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::copyFromBin(class 
OSG::ExceptionBinaryDataHandler &)" 
(?copyfrom...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@qaexaavexceptionbinarydatahand...@2@@Z)"
 
in Funktion ""public: virtual void __thiscall 
OSG::QTWindowBase::copyFromBin(class OSG::ExceptionBinaryDataHandler 
&,unsigned __int64)" 
(?copyfrom...@qtwindowbase@OSG@@uaexaavexceptionbinarydatahand...@2@_...@z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: __thiscall OSG::SField<class OSG::OSGQGLWidget 
*,0>::SField<class OSG::OSGQGLWidget *,0>(class OSG::OSGQGLWidget * 
const)" 
(??0?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@q...@qavosgqglwidget@1@@Z)" 
in Funktion ""protected: __thiscall 
OSG::QTWindowBase::QTWindowBase(void)" (??0qtwindowb...@osg@@i...@xz)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: __thiscall OSG::SField<class OSG::OSGQGLWidget 
*,0>::SField<class OSG::OSGQGLWidget *,0>(class OSG::SField<class 
OSG::OSGQGLWidget *,0> const &)" 
(??0?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@q...@abv01@@Z)" in Funktion 
""protected: __thiscall OSG::QTWindowBase::QTWindowBase(class 
OSG::QTWindowBase const &)" (??0qtwindowb...@osg@@i...@abv01@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: __thiscall OSG::SField<class OSG::OSGQGLWidget 
*,0>::~SField<class OSG::OSGQGLWidget *,0>(void)" 
(??1?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@q...@xz)" in Funktion 
""protected: virtual __thiscall OSG::QTWindowBase::~QTWindowBase(void)" 
(??1qtwindowb...@osg@@m...@xz)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::syncWith(class OSG::SField<class 
OSG::OSGQGLWidget *,0> &)" 
(?syncw...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@QAEXAAV12@@Z)" in 
Funktion ""protected: void __thiscall OSG::QTWindowBase::execSync(class 
OSG::QTWindowBase *,unsigned __int64,class std::vector<int,class 
std::allocator<int> > &,unsigned __int64,unsigned int)" 
(?execs...@qtwindowbase@OSG@@iaexpa...@_kaav?$vector@hv?$alloca...@h@std@@@std@@1...@z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::pushValueToStream(class OSG::OutStream &)const " 
(?pushvaluetostr...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@qbexaavoutstr...@2@@Z)"
 
in Funktion ""public: virtual void __thiscall OSG::GetSFieldHandle<class 
OSG::SField<class OSG::OSGQGLWidget *,0> >::pushValueToStream(class 
OSG::OutStream &)const " 
(?pushvaluetostr...@?$getsfieldhandle@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@ubexaavoutstr...@2@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::pushSizeToStream(class OSG::OutStream &)const " 
(?pushsizetostr...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@qbexaavoutstr...@2@@Z)"
 
in Funktion ""public: virtual void __thiscall OSG::GetSFieldHandle<class 
OSG::SField<class OSG::OSGQGLWidget *,0> >::pushSizeToStream(class 
OSG::OutStream &)const " 
(?pushsizetostr...@?$getsfieldhandle@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@ubexaavoutstr...@2@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: bool __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::operator==(class OSG::SField<class 
OSG::OSGQGLWidget *,0> const &)const " 
(??8?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@QBE_NABV01@@Z)" in Funktion 
""public: virtual bool __thiscall OSG::GetSFieldHandle<class 
OSG::SField<class OSG::OSGQGLWidget *,0> >::equal(class 
boost::shared_ptr<class OSG::GetFieldHandle>)const " 
(?eq...@?$getsfieldhandle@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@ube_nv?$shared_...@vgetfieldhandle@OSG@@@boost@@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::setValueFromCString(char const *)" 
(?setvaluefromcstr...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@qaex...@z)" 
in Funktion ""public: virtual void __thiscall 
OSG::EditSFieldHandle<class OSG::SField<class OSG::OSGQGLWidget *,0> 
 >::pushValueFromCString(char const *)" 
(?pushvaluefromcstr...@?$editsfieldhandle@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@uaex...@z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::setValue(class OSG::SField<class 
OSG::OSGQGLWidget *,0> const &)" 
(?setva...@?$sfield@pavosgqglwid...@osg@@$0A@@OSG@@QAEXABV12@@Z)" in 
Funktion ""public: virtual void __thiscall OSG::EditSFieldHandle<class 
OSG::SField<class OSG::OSGQGLWidget *,0> >::copyValues(class 
boost::shared_ptr<class OSG::GetFieldHandle>)const " 
(?copyval...@?$editsfieldhandle@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@ubexv?$shared_...@vgetfieldhandle@OSG@@@boost@@@Z)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: __thiscall OSG::SField<class OSG::OSGQGLWidget 
*,0>::SField<class OSG::OSGQGLWidget *,0>(void)" 
(??0?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@q...@xz)" in Funktion 
""public: static class OSG::Field * __cdecl OSG::FieldDescription<struct 
OSG::FieldTraits<class OSG::OSGQGLWidget *,0>,0,struct 
OSG::NoRefCounts,0>::DefaultFieldCreateHandler::createField(void)" 
(?createfi...@defaultfieldcreatehandler@?$fielddescript...@u?$fieldtraits@pavosgqglwid...@osg@@$0A@@OSG@@$...@unorefcounts@2...@$0a@@OSG@@sapavfi...@3@XZ)".
1>OSGQT4WindowBase.obj : error LNK2019: Verweis auf nicht aufgelöstes 
externes Symbol ""public: void __thiscall OSG::SField<class 
OSG::OSGQGLWidget *,0>::operator=(class OSG::SField<class 
OSG::OSGQGLWidget *,0> const &)" 
(??4?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@QAEXABV01@@Z)" in Funktion 
""public: virtual void __thiscall OSG::SFieldConnector<class 
OSG::SField<class OSG::OSGQGLWidget *,0> >::process(void)" 
(?proc...@?$sfieldconnector@v?$sfi...@pavosgqglwidget@OSG@@$0A@@OSG@@@OSG@@UAEXXZ)".
1>C:\src\lib\OpenSG2_current\build\bin\DebugRT\OSGWindowQT4_d.dll : 
fatal error LNK1120: 15 nicht aufgelöste externe Verweise.

Any ideas?

Cheers,
Christoph

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to