yes, that was what I saw earlier in one post. But good you made it work :-)

Nick


On Fri, Dec 13, 2013 at 3:00 PM, Lionel Lagarde
<lionel.laga...@oktal-se.fr>wrote:

>  Hi Nick,
>
> The solution involving the #ifdefs is to use the osgDB::fstream classes
> instead of the std ones using #defines:
>
> #ifdef WIN32
>
> // Replace STL fstream with OSG fstream
> #include <osgDB/fstream>
> #define ifstream osgDB::ifstream
> #define ofstream osgDB::ofstream
>
> #else
>
> #include <fstream>
> #define ifstream std::ifstream
> #define ofstream std::ofstream
>
> #endif
>
>
> It doesn't apply in my case.
>
> But I manage to make the it works using directly the vector implementation
> of the MixinVector:
>
> osg::IntArray *array = ...
> std::vector<int> &v = array->asVector();
> v[0] = 10;
>
>
>
>
>
> On 13/12/2013 11:50, Trajce Nikolov NICK wrote:
>
> Hi Lionel,
>
>  this topic was discussed before as I can recall and there was a neat
> solution (with #ifdefs) posted to avoid the conflict. Have a look in the
> archive, can not remember the author
>
>  Nick
>
>
> On Fri, Dec 13, 2013 at 1:41 PM, Lionel Lagarde <
> lionel.laga...@oktal-se.fr> wrote:
>
>> My problem looks like the osgDB::fstream / std::fstream conflict which
>> was resolved using the /FORCE:MULTIPLE linker flag.
>> Does anyone has more information on this ?
>>
>>
>> On 12/12/2013 18:39, Lionel Lagarde wrote:
>>
>>> It seems that osg80-osgd.dll contains the symbols of "scalar integer"
>>> (char, uchar, short, ushort, int, uint) specializations of the
>>> MixinVector.
>>>
>>> The vector and floating point specializations are not defined.
>>>
>>> On 12/12/2013 18:19, Lionel Lagarde wrote:
>>>
>>>> Hi,
>>>>
>>>> I use Visual Express C++ 2010.
>>>>
>>>> The following code works very well:
>>>> osg::FloatArray *array = ...
>>>> (*array)[i] = 10.0;
>>>>
>>>> I decided to add integer support:
>>>> osg::IntArray *array = ...
>>>> (*array)[i] = 10;
>>>>
>>>> And the linker says:
>>>> osgd.lib(osg80-osgd.dll) : error LNK2005: "public: int & __cdecl
>>>> osg::MixinVector::operator[](unsigned __int64)" already defined in
>>>> libseFastOsgCored.lib(OsgUniform.obj)
>>>>
>>>> Any idea ?
>>>>
>>>> _______________________________________________
>>>> osg-users mailing list
>>>> osg-users@lists.openscenegraph.org
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>>
>>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
>  --
> trajce nikolov nick
>
>
> _______________________________________________
> osg-users mailing 
> listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to