From: Carsten N. <car...@gm...> - 2008-06-26 15:46:37
|
Hello Mark, Mark Nielsen wrote: > Hi folks! > I have downloaded the 25.06.08 Daily Build and I tried to compile an > OpenSG-based application which I used to be able to compile flawlessly > with an older version of the library. > Everything compiles fine, but I get the following linker errors: > > error LNK2001: unresolved external symbol "__declspec(dllimport) public: > class std::_Vb_reference<class std::vector<bool,class > std::allocator<bool> > > __thiscall > osg::MField<bool,2>::operator[](unsigned int)" > (__imp_??A?$MField@_N$01@osg@@QAE?AV?$_Vb_reference@V?$vector@_NV?$allocator@_N@std@@@std@@@std@@I@Z) > > AND > > error LNK2001: unresolved external symbol "__declspec(dllimport) public: > class std::_Vb_reference<class std::vector<bool,class > std::allocator<bool> > > __thiscall > osg::MField<bool,2>::getValue(unsigned int)" > (__imp_?getValue@?$MField@_N$01@osg@@QAE?AV?$_Vb_reference@V?$vector@_NV?$allocator@_N@std@@@std@@@std@@I@Z) I'm not using windows for development (yet), so please take the following with a grain of salt. I believe we had this problem in the past and there are files in the source tree that explicitly instruct the linker that the symbols it is looking for are really present in the library even if it seemingly can not find them. It looks as if we have to add more symbols to those files (they are in e.g. Source/System/FieldContainer/lib.def.cl.net.sym). Unfortunately the format of these files seems to be different from what the linker prints in the error message, so I'm not sure what exactly has to be added - can someone with windows experience help out here, please? After having read MS's page on that error message (<http://msdn.microsoft.com/en-us/library/f6xx1b1z(vs.71).aspx>) I suspect that inlining might be the problem and the compiler does not properly honor the inline on the function definition, but insists on seeing it on the declaration. If I'm right a quick fix might be to add inline to the declaration of getValue and operator[] in OSGMField.h. Hope it helps, Carsten |