You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source of your problem is due to the deviation of libc++ from libstdc++ (details can be found on http://libcxx.llvm.org)
Since OS X 10.9, Apple uses its own version of C++ library, i.e. libc++, with its clang compiler by default, rather than the standard libstdc++ from GNU.
However, in CMakeList.txt, the deployment target is set to 10.7, i.e.
# 10.7 is the minimum for libc++ support
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
The parameter CMAKE_OSX_DEPLOYMENT_TARGET is propagated into the compilation argument as '-mmacosx-version-min=10.7'
In OS X 10.7, the default C++ library was still libstdc++. Thus, clang attempts to link OGRE against libstdc++. Meanwhile, the boost library on your Mac OSX has been updated and is built with libc++, which you can confirm with otool as follow:
otool -L /usr/local/lib/libboost_system.dylib
Therefore, the linker cannot find the libc++ library required by boost.
Solution: in short, build OGRE targeting at your OS X version (i,e, 10.10) by correcting CMAKE_OSX_DEPLOYMENT_TARGET.
[reporter="wdavilaneto", created="Mon, 24 Aug 2015 06:52:11 +0200"]
Linking CXX shared library ../lib/macosx/Ogre.framework/Ogre
Undefined symbols for architecture x86_64:
"std::_1::vector_base_common::_throw_length_error() const", referenced from:
void std::_1::vector1::pair, std::1::allocator1::pair > >::push_back_slow_path1::pair const>(std::_1::pair const&) in libboost_thread-mt.a(thread.o)
void std::_1::vector, std::1::allocator > >::_push_back_slow_path const>(boost::shared_ptr const&) in libboost_thread-mt.a(thread.o)
"std::runtime_error::runtime_error(char const*)", referenced from:
boost::condition_variable::wait(boost::unique_lock&) in libboost_thread-mt.a(thread.o)
boost::condition_variable::do_wait_until(boost::unique_lock&, timespec const&) in libboost_thread-mt.a(thread.o)
boost::condition_variable::condition_variable() in libboost_thread-mt.a(thread.o)
boost::mutex::mutex() in libboost_thread-mt.a(thread.o)
boost::unique_lock::lock() in libboost_thread-mt.a(thread.o)
boost::mutex::lock() in libboost_thread-mt.a(thread.o)
boost::unique_lock::unlock() in libboost_thread-mt.a(thread.o)
...
"std::runtime_error::runtime_error(std::runtime_error const&)", referenced from:
void boost::throw_exception(boost::thread_resource_error const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl > boost::enable_current_exception >(boost::exception_detail::error_info_injector const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone() const in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone_impl(boost::exception_detail::clone_impl > const&) in libboost_thread-mt.a(thread.o)
void boost::throw_exception(boost::lock_error const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl > boost::enable_current_exception >(boost::exception_detail::error_info_injector const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone() const in libboost_thread-mt.a(thread.o)
...
"std::_1::basic_string1::char_traits, std::1::allocator >::_init(char const*, unsigned long)", referenced from:
boost::system::(anonymous namespace)::generic_error_category::message(int) const in libboost_system-mt.a(error_code.o)
"std::_1::basic_string1::char_traits, std::_1::allocator >::append(char const*)", referenced from:
boost::system::system_error::what() const in libboost_thread-mt.a(thread.o)
"std::_1::basic_string1::char_traits, std::_1::allocator >::append(char const*, unsigned long)", referenced from:
boost::system::system_error::what() const in libboost_thread-mt.a(thread.o)
"std::_1::basic_string1::char_traits, std::_1::allocator >::assign(char const*)", referenced from:
boost::system::system_error::what() const in libboost_thread-mt.a(thread.o)
boost::system::(anonymous namespace)::generic_error_category::message(int) const in libboost_system-mt.a(error_code.o)
"std::_1::basic_string1::char_traits, std::1::allocator >::basic_string(std::1::basic_string1::char_traits, std::_1::allocator > const&)", referenced from:
void boost::throw_exception(boost::thread_resource_error const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl > boost::enable_current_exception >(boost::exception_detail::error_info_injector const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone() const in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone_impl(boost::exception_detail::clone_impl > const&) in libboost_thread-mt.a(thread.o)
void boost::throw_exception(boost::lock_error const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl > boost::enable_current_exception >(boost::exception_detail::error_info_injector const&) in libboost_thread-mt.a(thread.o)
boost::exception_detail::clone_impl >::clone() const in libboost_thread-mt.a(thread.o)
...
"std::_1::basic_string1::char_traits, std::_1::allocator >::~basic_string()", referenced from:
boost::system::system_error::what() const in libboost_thread-mt.a(thread.o)
boost::condition_variable::wait(boost::unique_lock&) in libboost_thread-mt.a(thread.o)
boost::condition_variable::do_wait_until(boost::unique_lock&, timespec const&) in libboost_thread-mt.a(thread.o)
boost::system::system_error::~system_error() in libboost_thread-mt.a(thread.o)
boost::system::system_error::~system_error() in libboost_thread-mt.a(thread.o)
boost::condition_variable::condition_variable() in libboost_thread-mt.a(thread.o)
void boost::throw_exception(boost::thread_resource_error const&) in libboost_thread-mt.a(thread.o)
...
"std::bad_alloc::bad_alloc()", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_object() in libboost_thread-mt.a(thread.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/macosx/Ogre.framework/Versions/1.10.0/Ogre] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: