[osg-users] Function decoration....

neil.hughes at tesco.net neil.hughes at tesco.net
Mon Nov 5 01:20:48 PST 2007


Hi All,

I'm having a slight problem building a release version of OSG1.2. I know I should move to 2.2 - and a colleague of mine has - however for various reasons I'm unable to at this moment. 

I'm running VS2005, and the problem I have is that I can build a debug version, link it against my app, and everything is fine. When I build the Release version of the OSG1.2 and link this against the release version of my app I get 5 unknown function calls - as follows.

1>axtest1ctrl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osgProducer::Viewer::realize(enum Producer::CameraGroup::ThreadingModel)" (?realize at Viewer@osgProducer@@UAE_NW4ThreadingModel at CameraGroup@Producer@@@Z)
1>axtest1ctrl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osg::Group::removeChild(unsigned int,unsigned int)" (?removeChild at Group@osg@@UAE_NII at Z)
1>axtest1ctrl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osg::Group::removeChild(class osg::Node *)" (?removeChild at Group@osg@@UAE_NPAVNode at 2@@Z)
1>axtest1ctrl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall osg::Geode::removeDrawable(unsigned int,unsigned int)" (?removeDrawable at Geode@osg@@UAE_NII at Z)
1>axtest1ctrl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall osg::CameraNode::setRenderOrder(enum osg::CameraNode::RenderOrder)" (__imp_?setRenderOrder at CameraNode@osg@@QAEXW4RenderOrder at 12@@Z) referenced in function "public: unsigned long __thiscall CAxTest1Ctrl::CreateHUDNode(void)" (?CreateHUDNode at CAxTest1Ctrl@@QAEKXZ)
1>CorrectInitialUnitPartMatrixVisitor.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class osg::Matrixd __cdecl osg::computeLocalToWorld(class std::vector<class osg::Node *,class std::allocator<class osg::Node *> > const &)" (__imp_?computeLocalToWorld at osg@@YA?AVMatrixd at 1@ABV?$vector at PAVNode@osg@@V?$allocator at PAVNode@osg@@@std@@@std@@@Z) referenced in function "public: virtual void __thiscall CCorrectInitialUnitPartMatrixVisitor::apply(class osg::Transform &)" (?apply at CCorrectInitialUnitPartMatrixVisitor@@UAEXAAVTransform at osg@@@Z)


Sorry about that. Anyway, on closer inspection it appears that my app is trying to link to 
osg::Group::removeChild(unsigned int,unsigned int)" (?removeChild at Group@osg@@UAE_NII at Z)

however when I examine the OSG dll produced when building a release version it contains the decorated function

osg::Group::removeChild(unsigned int,unsigned int)" (?removeChild at Group@osg@@QAE_NII at Z)

(in case you missed it, the bit that's different is the decoration).

I've trawled through the MS documentation, played with a few compiler/linker settings associated with inline functions, all to no avail.

Has anyone got any ideas ?

Many thanks for any help.

Neil.






More information about the osg-users mailing list