[osg-users] osgDB ifstream / ofstream conflict

Vincent Bourdier vincent.bourdier at gmail.com
Wed Apr 27 08:47:21 PDT 2011


Hi,

Sorry to insist but I would appreciate any advices about this issue. 
Maybe I'm the only one who encountered it, but the patch I did is not 
so... "clean" to my mind...

Thanks.

Regards,
     Vincent.

Le 21/04/2011 14:50, Vincent Bourdier a écrit :
> Hi all,
>
> I just found a fix after some tests, but it is not a fix I am proud of.
> I just added the close() method in osgDB/fstream implementation, so 
> there is no conflict because my fstream implementation uses 
> osgDB/fstream and not osgDB/fstream AND std::fstream.
>
> I will continue to investigate to be sure to understand why this 
> occurs, but any advices or explanations are welcome.
> If my fix is accepted this could be a submission for OSG, eventually...
>
> Thanks.
>
> Regards,
>     Vincent.
>
> Le 20/04/2011 14:54, Vincent Bourdier a écrit :
>> Hi Mourad
>>
>> Thanks for your answer but I already checked that. TsLib_MDdNET2010 
>> is a static lib but linked with /MD(d), like my application...
>>
>> Vincent.
>>
>> Le 20/04/2011 11:50, Mourad Boufarguine a écrit :
>>> Hi Vincent,
>>>
>>> On Mon, Apr 4, 2011 at 4:36 PM, Vincent Bourdier 
>>> <vincent.bourdier at gmail.com <mailto:vincent.bourdier at gmail.com>> wrote:
>>>
>>>     2>TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: "public:
>>>     void __thiscall std::basic_ifstream<char,struct
>>>     std::char_traits<char> >::close(void)"
>>>     (?close@?$basic_ifstream at DU?$char_traits at D@std@@@std@@QAEXXZ)
>>>     already defined in osgDBd.lib(osg65-osgDBd.dll)
>>>     2>TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: "public:
>>>     void __thiscall std::basic_ifstream<char,struct
>>>     std::char_traits<char> >::close(void)"
>>>     (?close@?$basic_ifstream at DU?$char_traits at D@std@@@std@@QAEXXZ)
>>>     already defined in osgDBd.lib(osg65-osgDBd.dll)
>>>
>>>
>>> It seems like a static/dynamic c++ runtime conflict. Check if osg 
>>> and TsLib_MDdNET2010 are linked against the same type of c++ runtime 
>>> (both with /MTd flag or both with /MDd flag)
>>>
>>> Mourad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110427/38a28922/attachment-0004.htm>


More information about the osg-users mailing list