Re: [osg-users] [build] Building a libc++ project against OSG on Mac OS X
On 6/05/13 20:42, Kellen Gillespie wrote: @ulrich - Thanks for the reply! It definitely makes sense to me that OSG would also need to be built with libc++ / c++11 in order to properly be linked to by my project. Since that's the case, do you remember how you did build OSG with those features? I've tried compiling OSG with libc++ but MANY of the Osg Plugins fail to compile when I'm using libc++ instead of libstdc++. Did you not run into these problems compiling OSG? Did you compile the plugin libraries with the same runtime library? /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Building a libc++ project against OSG on Mac OS X
Hi Kellen, Yes, I've used OSG with clang++/libc++. The error you're seeing is due to trying to link libraries that use different runtimes. In your case OSG is probably using libstdc++ and your own project is using libc++. They have to match, which means you have to recompile OSG. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Building a libc++ project against OSG on Mac OS X
@ulrich - Thanks for the reply! It definitely makes sense to me that OSG would also need to be built with libc++ / c++11 in order to properly be linked to by my project. Since that's the case, do you remember how you did build OSG with those features? I've tried compiling OSG with libc++ but MANY of the Osg Plugins fail to compile when I'm using libc++ instead of libstdc++. Did you not run into these problems compiling OSG? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53939#53939 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Building a libc++ project against OSG on Mac OS X
Hi, I have been using OSG in my projects for some time now and have had great experiences so far! Now we are trying to harness the power of C++ 11 features (my linux buddies have been doing so for a while and I've been using older boost counterparts). I decided to make take the plunge and try to get the project using c++ 11 on Mac OS X. I just rebuilt OSG 3.1.5 from source using my updated boost libraries and other dependencies. I made sure when building OSG that CMAKE_OSX_ARCHITECTURES was set to 'x86_64'. After installing OSG I made a dummy project that was (a) using OSG (and OsgDB) and (b) using libc++ / c11 with clang. My dummy file basically has one line related to osg: Code: osg::Node *node = osgDB::readNodeFile(modelName); The linking process of my simple file fails, however, with the following: Undefined symbols for architecture x86_64: osgDB::readNodeFile(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const, osgDB::Options const*), referenced from: osgDB::readNodeFile(std::__1::basic_stringchar, std::__1::char_traitschar, std::__1::allocatorchar const) in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Now I know for sure that I built OSG with the architecture x86_64, so I don't think that's the issue. What I'mm thinking is more likely the culprit is using the c11 standards. Has anyone out there built against OSG using the following compiler flags? -std=c++11 -stdlib=libc++ If I'm trying to do this, should I HAVE to build OSG itself with these flags? Any help would be appreciated, thanks! Cheers, Kellen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53876#53876 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org