Building a native project for iOS: stdlibc++ vs libc++
Posted: 29 Mar 2014, 16:34
Hey guys,
I've been playing a bit with getting a sample project building for iOS and I've run into a bit of a road block. This project is using some newer C++11 features (std::unique_ptr, std::function, etc) that are not available in the version of stdlibc++ shipped by Apple, so I've been linking against libc++.
This has worked fine for Mac projects (though not ideal) since Noesis is setup as a shared library. Unfortunately, since iOS requires static libraries I end up with errors because of the conflicts between the two separate standard libraries.
Would it be insane to have Noesis link against libc++ on Mac/iOS? I know Xcode 5 defaults to linking against libc++ for new projects, to enable C++11 features. Could this be more of an issue in the future if Apple decides to never update their libstdc++ version? I could make my project link against libstdc++, and rely on Boost to provide the C++11 standard library features I'm using, but I'd prefer avoiding that if possible. Curious about anyone's thoughts on the matter.
I've been playing a bit with getting a sample project building for iOS and I've run into a bit of a road block. This project is using some newer C++11 features (std::unique_ptr, std::function, etc) that are not available in the version of stdlibc++ shipped by Apple, so I've been linking against libc++.
This has worked fine for Mac projects (though not ideal) since Noesis is setup as a shared library. Unfortunately, since iOS requires static libraries I end up with errors because of the conflicts between the two separate standard libraries.
Would it be insane to have Noesis link against libc++ on Mac/iOS? I know Xcode 5 defaults to linking against libc++ for new projects, to enable C++11 features. Could this be more of an issue in the future if Apple decides to never update their libstdc++ version? I could make my project link against libstdc++, and rely on Boost to provide the C++11 standard library features I'm using, but I'd prefer avoiding that if possible. Curious about anyone's thoughts on the matter.