Thanks Vincent and JS;

It is interesting no-no which is seen to me odd :) It always restrict us
while using created dll project which uses osg. So I have to create my own
dll project in two version (debug and release) for compiling new project
which uses this dll in it for possibility of beeing different compilation
mode.

Best Regards.

2009/6/19 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com>

> Hello Ümit,
>
>  Until now, I have been using VS2003 in all project. But we have upgraded
>> to VS2008. I don't know why can't load released OSG in Debug mode or vice
>> versa. It throws and std::badalloc exception while using reading some model
>> or images by osgDB's static functions(readNode, readImageFile etc...) But
>> same code works when working same mode.
>> VS2008 don't let us to use this interchangeability anymore or should I set
>> some parameters?
>>
>
> You mean you're trying to link an app compiled in debug with an OSG lib
> compiled in release, or vice versa?
>
> Yeah, that's a big no-no, and it's been discussed often on this list. You
> need to match the debug/release across your whole project, at least since
> VC++ 2005. Otherwise the standard library used is different and makes
> different assumptions about how to allocate memory and other things.
>
> This is true for any library that is coded in C++. If the dependency
> contains only C code, you can use only the release version of that lib with
> both release and debug applications if you want.
>
> The OSG dependencies packages contain both release and debug dependencies,
> and CMake will choose the right one when compiling OSG. You just need to
> make sure you do the same thing in your own apps/projects - when compiling
> your project in release, link to osg.lib/osgDB.lib/... and when compiling it
> in debug, link to osgd.lib/osgDBd.lib/...
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Ümit Uzun
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to