HI, have you tried to compile your own code and osg with the llvm-gcc4.2 compiler? llvm-gcc 4.2 should include openMP. (Haven't tested that by myself)
HTH, Stephan Am 26.04.12 11:09, schrieb Tobias Duckworth: > Hi, > > I'm building OpenSceneGraph from the head of the trunk on Mac OS 10.7 Lion > using CMake. The build works straight out of the box defaulting to the llvm > compilers. > > I'm using OpenSceneGraph in a project built using gcc-mp-4.7, and so linking > to the libraries built in the above step from my project. > > I'm experiencing a problem with primitive sets at runtime - Namely, a > primitive set I create causes a crash when it goes out of scope. > > I've managed to boil my problem down to a very simple implementation: > > > Code: > > int main(int argc, char *argv[]) > { > osg::ref_ptr<osg::PrimitiveSet> p = new osg::DrawElementsUByte(); > return 0; > } > > > > > > When executed, with the OSG libraries built using llvm, and the program built > using gcc-mp-4.7, the following happens: > > > Code: > > Tobys-MacBook-Pro:xxx tobiasduckworth$ ./3DRecon.app/Contents/MacOS/3DRecon > 3DRecon(23649,0x7fff7612f960) malloc: *** error for object 0x10e163ec0: > pointer being freed was not allocated > *** set a breakpoint in malloc_error_break to debug > Abort trap: 6 > > > > > However, if I build the program using the same compiler (llvm) as OSG, then > it runs fine. > > My program uses OpenMP, so I need to use gcc to get this to compile, > otherwise I could move to llvm. > > I also tried to build OSG using gcc, but this failed due to osgViewer using > Objective C. > > Does anyone have any idea what might be going wrong here? > Should I be able to build OSG using llvm and my application using gcc? > > Hoping someone can shed some light, > ... > > Thank you! > > Cheers, > Tobias > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47314#47314 > > > > > > _______________________________________________ > 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