Hi Sam, I don't use Windows but have witnessed lots of users report trapped by build/runtume link problems under Windows due to the crappy way that Windows/Visual Studio manages linking of libraries at runtime. You can't mix libraries that are built with different memory allocators such as debug/release.
I would recommend making sure you don't have different build types on the same machine that you can accidentally link to at runtime, make sure that everything is built in a consistent way. The other solution is just move to an operating system and build tools that don't make developing C++ application so unnecessarily hard. Robert. On 22 April 2014 04:41, Sam Mania <samer.mouba...@gmail.com> wrote: > Hi, > > Sorry for this probably naive question, but I just started working with OSG. > I've set up a VC++ project and I'm trying to load an obj file. I get an > Unhandeled exception std::bad_alloc at memory location error. I tried to open > the obj file using osgviewer and it works fine. > > The exception happens in the ReadFile file, at this statement: > > Code: > return readNodeFile(filename,Registry::instance()->getOptions()); > > > > This is my basic code in c++: > > > Code: > > #include <osg\Node> > #include <osgDB\ReadFile> > using namespace osg; > int main(){ > > ref_ptr<Node> node = osgDB::readNodeFile("C:/Users/Sam/Debby.obj"); > return 0; > } > > > > I'm thinking this might have to do with the plugins not activated or linked > somehow? I'm attaching the obj file if anyone wants to test it. > > I also tried to run any other .osg files that come with the distribution, but > with the same error. > > Thanks a lot for any pointers, and apologies in advance if this is too basic, > but I tried to look for solutions with no luck. > ... > > Thank you! > > Cheers, > Sam > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=59086#59086 > > > > > > _______________________________________________ > 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