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)" 
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@[EMAIL 
> PROTECTED]@std@@@std@@@std@@[EMAIL PROTECTED])
> 
> 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)" 
> ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL 
> PROTECTED]@std@@@std@@@std@@[EMAIL PROTECTED])

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


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to