trying to use Boost.Log on OSX (via MacPorts)
/*
* Copyright Andrey Semashev 2007 - 2013.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
namespace logging = boost::log;
//[ example_tutorial_trivial_with_filtering
void init()
{
logging::core::get()->set_filter
(
logging::trivial::severity >= logging::trivial::info
);
}
int main(int, char*[])
{
init();
BOOST_LOG_TRIVIAL(trace) << "A trace severity message";
BOOST_LOG_TRIVIAL(debug) << "A debug severity message";
BOOST_LOG_TRIVIAL(info) << "An informational severity message";
BOOST_LOG_TRIVIAL(warning) << "A warning severity message";
BOOST_LOG_TRIVIAL(error) << "An error severity message";
BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message";
return 0;
}
//]
(code sample taken from http://www.boost.org/doc/libs/1_54_0_beta1/libs/log/example/doc/tutorial_trivial_flt.cpp)
but when compiling lot of unresolved externals errors are produced:
$ gcc -I/opt/local/include loggertest.cpp -o loggertest -L/opt/local/lib -lboost_log-mt
Undefined symbols for architecture x86_64:
"boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)", referenced from:
boost::log::v2s_mt_posix::record::reset() in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)", referenced from:
boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::auto_release::~auto_release() in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::unhandled_exception_count()", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)", referenced from:
init() in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::push_record_unlocked(boost::rv<boost::log::v2s_mt_posix::record>&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::get()", referenced from:
init() in loggertest-87632e.o
"boost::log::v2s_mt_posix::sources::aux::get_severity_level()", referenced from:
boost::log::v2s_mt_posix::sources::aux::severity_level<boost::log::v2s_mt_posix::trivial::severity_level>::set_value(boost::log::v2s_mt_posix::trivial::severity_level) in loggertest-87632e.o
"boost::log::v2s_mt_posix::trivial::logger::get()", referenced from:
_main in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::get_logging_enabled() const", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::ios_base::getloc() const", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(unsigned long, char)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::flush() in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::sentry::sentry(boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::sentry::~sentry() in loggertest-87632e.o
"std::__1::ctype<char>::id", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::locale::~locale()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::terminate()", referenced from:
___clang_call_terminate in loggertest-87632e.o
"vtable for __cxxabiv1::__class_type_info", referenced from:
typeinfo for boost::exception in loggertest-87632e.o
typeinfo for boost::log::v2s_mt_posix::type_info_wrapper::uninitialized in loggertest-87632e.o
typeinfo for boost::log::v2s_mt_posix::aux::visible_type<boost::log::v2s_mt_posix::trivial::severity_level> in loggertest-87632e.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"operator delete(void*)", referenced from:
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::light_function<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > const&, boost::disable_if_c<is_rv_or_same<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)> >::value, int>::type) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::clone_impl(void const*) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::destroy_impl(void*) in loggertest-87632e.o
"operator new(unsigned long)", referenced from:
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::light_function<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > const&, boost::disable_if_c<is_rv_or_same<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)> >::value, int>::type) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::clone_impl(void const*) in loggertest-87632e.o
"___cxa_begin_catch", referenced from:
___clang_call_terminate in loggertest-87632e.o
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___cxa_end_catch", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___cxa_rethrow", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___gxx_personality_v0", referenced from:
init() in loggertest-87632e.o
_main in loggertest-87632e.o
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-87632e.o
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >, boost::log::v2s_mt_posix::trivial::severity_level>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
other boost libraries (system, thread, filesystem) work well. is there something wrong with my linker flags? build system? installation?
Edit: I also tried using clang++ as suggested, but I get similar errors:
$ clang++ -I/opt/local/include loggertest.cpp -o loggertest -L/opt/local/lib -lboost_log-mt -lboost_log_setup-mt
Undefined symbols for architecture x86_64:
"boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)", referenced from:
boost::log::v2s_mt_posix::record::reset() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)", referenced from:
boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::auto_release::~auto_release() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::unhandled_exception_count()", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-0b0a3b.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)", referenced from:
init() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::push_record_unlocked(boost::rv<boost::log::v2s_mt_posix::record>&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::get()", referenced from:
init() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::sources::aux::get_severity_level()", referenced from:
boost::log::v2s_mt_posix::sources::aux::severity_level<boost::log::v2s_mt_posix::trivial::severity_level>::set_value(boost::log::v2s_mt_posix::trivial::severity_level) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::trivial::logger::get()", referenced from:
_main in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::get_logging_enabled() const", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-0b0a3b.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Edit: solved by compiling with -DBOOST_LOG_DYN_LINK as suggested by #neverpanic
You are experiencing a standard library mismatch. Boost from MacPorts (and all other libraries from MacPorts and on modern OS X since 10.9, I think) are built against clang's libc++, rather than gcc's libstdc++. If you attempt to mix both standard libraries, you'll run into this problem (which is a good thing, because if you wouldn't see this, you'd likely see hard to debug crashes at runtime).
You need to use clang++ instead of gcc to compile your code. Alternatively, you can use /usr/bin/g++, which is nowadays a symlink to clang.
Related
I've just downloaded this repo: UCTDom
And opening the project in Clion from the /UCTDom-master dir, or attempting to make from /UCTDom-master/Console4SimpleStorage/Console4SimpleStorage results in this missing architecture error:
Undefined symbols for architecture x86_64:
"BigMoneyAI::~BigMoneyAI()", referenced from:
Player::~Player() in main-cd1c38.o
"FlatUCBMod::~FlatUCBMod()", referenced from:
Player::~Player() in main-cd1c38.o
"HumanInputAI::~HumanInputAI()", referenced from:
Player::~Player() in main-cd1c38.o
"DoubleWitchAI::~DoubleWitchAI()", referenced from:
Player::~Player() in main-cd1c38.o
"SingleWitchAI::~SingleWitchAI()", referenced from:
Player::~Player() in main-cd1c38.o
"UCTMonteCarlo::~UCTMonteCarlo()", referenced from:
Player::~Player() in main-cd1c38.o
"Game::initialize()", referenced from:
playGame(Game&) in main-cd1c38.o
"Game::writeCSVLog(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
_main in main-cd1c38.o
"Game::writeToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
writeToFile(Game&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in main-cd1c38.o
"Game::writeMoveHistoryToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
_main in main-cd1c38.o
"Game::play()", referenced from:
playGame(Game&) in main-cd1c38.o
"Game::Game()", referenced from:
_main in main-cd1c38.o
"FlatUCB::~FlatUCB()", referenced from:
Player::~Player() in main-cd1c38.o
"RandomAI::~RandomAI()", referenced from:
Player::~Player() in main-cd1c38.o
"GameState::~GameState()", referenced from:
Game::~Game() in main-cd1c38.o
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
std::__1::ctype<char> const& std::__1::use_facet<std::__1::ctype<char> >(std::__1::locale const&) in main-cd1c38.o
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*) in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(unsigned long, char) in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*) in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
writeToFile(Game&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in main-cd1c38.o
_main in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
writeToFile(Game&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in main-cd1c38.o
_main in main-cd1c38.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*) in main-cd1c38.o
Game::~Game() in main-cd1c38.o
Move::~Move() in main-cd1c38.o
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in main-cd1c38.o
"std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(int&)", referenced from:
_main in main-cd1c38.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in main-cd1c38.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in main-cd1c38.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in main-cd1c38.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in main-cd1c38.o
"std::__1::cin", referenced from:
_main in main-cd1c38.o
"std::__1::cout", referenced from:
playGame(Game&) in main-cd1c38.o
_main in main-cd1c38.o
"std::__1::ctype<char>::id", referenced from:
std::__1::ctype<char> const& std::__1::use_facet<std::__1::ctype<char> >(std::__1::locale const&) in main-cd1c38.o
"std::__1::locale::~locale()", referenced from:
std::__1::basic_ios<char, std::__1::char_traits<char> >::widen(char) const in main-cd1c38.o
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in main-cd1c38.o
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::ios_base::setstate(unsigned int) in main-cd1c38.o
"std::__1::to_string(int)", referenced from:
_main in main-cd1c38.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in main-cd1c38.o
"std::terminate()", referenced from:
___clang_call_terminate in main-cd1c38.o
"operator delete(void*)", referenced from:
_main in main-cd1c38.o
std::__1::_DeallocateCaller::__do_call(void*) in main-cd1c38.o
"operator new(unsigned long)", referenced from:
_main in main-cd1c38.o
"___cxa_begin_catch", referenced from:
___clang_call_terminate in main-cd1c38.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in main-cd1c38.o
"___cxa_call_unexpected", referenced from:
std::__1::__vector_base<Move, std::__1::allocator<Move> >::__destruct_at_end(Move*) in main-cd1c38.o
std::__1::allocator<Move>::deallocate(Move*, unsigned long) in main-cd1c38.o
std::__1::__vector_base<LogItem, std::__1::allocator<LogItem> >::__destruct_at_end(LogItem*) in main-cd1c38.o
std::__1::allocator<LogItem>::deallocate(LogItem*, unsigned long) in main-cd1c38.o
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::ostreambuf_iterator(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in main-cd1c38.o
"___cxa_end_catch", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in main-cd1c38.o
"___gxx_personality_v0", referenced from:
writeToFile(Game&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in main-cd1c38.o
_main in main-cd1c38.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*) in main-cd1c38.o
Game::~Game() in main-cd1c38.o
std::__1::__vector_base<Move, std::__1::allocator<Move> >::__destruct_at_end(Move*) in main-cd1c38.o
std::__1::allocator<Move>::deallocate(Move*, unsigned long) in main-cd1c38.o
std::__1::__vector_base<LogItem, std::__1::allocator<LogItem> >::__destruct_at_end(LogItem*) in main-cd1c38.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: *** [main.o] Error 1
Process finished with exit code 2
I have figured out that perhaps the undefined deconstructors is an aspect of this, but it seems to me that this would have been a problem to the creators of the repo so I also figure that there is some simple file trick I have to do for the makefile in order to have it compile
for quick reference, heres the makefile:
CXX=g++
CXXFLAGS= -std=c++0x -Wall -pedantic
LDFLAGS=
SOURCES=main.cpp BigMoneyAI.cpp CardManager.cpp Game.cpp GameState.cpp HumanInputAI.cpp Move.cpp Node.cpp Player.cpp PlayerState.cpp UCTMonteCarlo.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=dominionuct
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $#
.cpp.o:
$(CC) $(CFLAGS) $< -o $#
I'm at a bit of a loss where to go with this, any help or tips to investigate would be much appreciated!
Thanks!
I am trying to run this example (from: https://theboostcpplibraries.com/boost.serialization-archive#ex.serialization_01):
#include <boost/archive/text_oarchive.hpp>
#include <iostream>
using namespace boost::archive;
int main()
{
text_oarchive oa{std::cout};
int i = 1;
oa << i;
}
With the command:
gcc -L"/usr/local/include/" test.cpp
And I am getting the following back:
Undefined symbols for architecture x86_64:
"boost::locale::base_message_format<char>::id", referenced from:
boost::locale::basic_message<char>::write(std::__1::locale const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in test-e8c2b0.o
"boost::locale::details::format_parser::get_position()", referenced from:
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
"boost::locale::details::format_parser::set_one_flag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
"boost::locale::details::format_parser::restore()", referenced from:
boost::locale::basic_format<char>::format_guard::restore() in test-e8c2b0.o
"boost::locale::details::format_parser::format_parser(std::__1::ios_base&, void*, void (*)(void*, std::__1::locale const&))", referenced from:
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
"boost::locale::details::format_parser::~format_parser()", referenced from:
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
"boost::locale::ios_info::display_flags(unsigned long long)", referenced from:
boost::locale::as::number(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::currency(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::date(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::time(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::strftime(std::__1::ios_base&) in test-e8c2b0.o
"boost::locale::ios_info::date_time_pattern_set()", referenced from:
void boost::locale::ios_info::date_time_pattern<char>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in test-e8c2b0.o
"boost::locale::ios_info::get(std::__1::ios_base&)", referenced from:
boost::locale::as::number(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::currency(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::date(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::as::time(std::__1::ios_base&) in test-e8c2b0.o
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
void boost::locale::details::format_parser::set_flag_with_str<char>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in test-e8c2b0.o
boost::locale::as::strftime(std::__1::ios_base&) in test-e8c2b0.o
...
"boost::locale::converter<char>::id", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_upper<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_lower<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_title<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::fold_case<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
"boost::locale::generator::generator()", referenced from:
_main in test-e8c2b0.o
"boost::locale::generator::~generator()", referenced from:
_main in test-e8c2b0.o
"boost::locale::ios_info::domain_id() const", referenced from:
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
"boost::locale::generator::generate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from:
boost::locale::generator::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(unsigned long, unsigned long, char const*, unsigned long) const", referenced from:
void boost::locale::details::format_parser::set_flag_with_str<char>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in test-e8c2b0.o
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
void std::__1::vector<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> > >::__push_back_slow_path<boost::locale::details::formattible<char> const>(boost::locale::details::formattible<char> const&) in test-e8c2b0.o
"std::__1::locale::has_facet(std::__1::locale::id&) const", referenced from:
boost::locale::basic_message<char>::write(std::__1::locale const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in test-e8c2b0.o
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_upper<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_lower<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::to_title<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > boost::locale::fold_case<char>(char const*, std::__1::locale const&) in test-e8c2b0.o
boost::locale::basic_message<char>::write(std::__1::locale const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
...
"std::__1::ios_base::getloc() const", referenced from:
_main in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
boost::locale::basic_format<char>::imbue_locale(void*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::logic_error::logic_error(char const*)", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"std::length_error::~length_error()", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:
_main in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)", referenced from:
boost::locale::basic_message<char>::str(std::__1::locale const&, int) const in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::reserve(unsigned long)", referenced from:
boost::locale::details::string_cast_traits<char>::cast(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char)", referenced from:
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
boost::locale::details::string_cast_traits<char>::cast(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
boost::locale::basic_format<char>::basic_format(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test-e8c2b0.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
_main in test-e8c2b0.o
boost::locale::basic_format<char>::~basic_format() in test-e8c2b0.o
boost::locale::basic_message<char>::~basic_message() in test-e8c2b0.o
boost::locale::basic_format<char>::basic_format(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test-e8c2b0.o
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
boost::locale::basic_message<char>::str(std::__1::locale const&, int) const in test-e8c2b0.o
boost::locale::basic_format<char>::format_output(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in test-e8c2b0.o
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(double)", referenced from:
_main in test-e8c2b0.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(long)", referenced from:
_main in test-e8c2b0.o
void boost::locale::details::formattible<char>::write<long>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, void const*) in test-e8c2b0.o
"std::__1::cout", referenced from:
_main in test-e8c2b0.o
"std::__1::ctype<char>::id", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::locale::global(std::__1::locale const&)", referenced from:
_main in test-e8c2b0.o
"std::__1::locale::locale(std::__1::locale const&)", referenced from:
_main in test-e8c2b0.o
boost::locale::basic_format<char>::imbue_locale(void*, std::__1::locale const&) in test-e8c2b0.o
"std::__1::locale::locale()", referenced from:
_main in test-e8c2b0.o
"std::__1::locale::~locale()", referenced from:
_main in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
boost::locale::basic_format<char>::write(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in test-e8c2b0.o
boost::locale::basic_format<char>::imbue_locale(void*, std::__1::locale const&) in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::locale::operator=(std::__1::locale const&)", referenced from:
_main in test-e8c2b0.o
boost::locale::basic_format<char>::imbue_locale(void*, std::__1::locale const&) in test-e8c2b0.o
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
"std::__1::ios_base::imbue(std::__1::locale const&)", referenced from:
_main in test-e8c2b0.o
boost::locale::basic_format<char>::imbue_locale(void*, std::__1::locale const&) in test-e8c2b0.o
"std::terminate()", referenced from:
___clang_call_terminate in test-e8c2b0.o
"typeinfo for std::length_error", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"typeinfo for char", referenced from:
void boost::locale::ios_info::string_set::set<char>(char const*) in test-e8c2b0.o
"vtable for std::length_error", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"operator delete[](void*)", referenced from:
void boost::locale::ios_info::string_set::set<char>(char const*) in test-e8c2b0.o
"operator delete(void*)", referenced from:
std::__1::__vector_base<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> > >::~__vector_base() in test-e8c2b0.o
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::~__split_buffer() in test-e8c2b0.o
"operator new[](unsigned long)", referenced from:
void boost::locale::ios_info::string_set::set<char>(char const*) in test-e8c2b0.o
"operator new(unsigned long)", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"___cxa_allocate_exception", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"___cxa_begin_catch", referenced from:
___clang_call_terminate in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
boost::locale::basic_format<char>::format_guard::~format_guard() in test-e8c2b0.o
"___cxa_call_unexpected", referenced from:
boost::locale::basic_message<char>::write(std::__1::locale const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in test-e8c2b0.o
void boost::locale::details::format_parser::set_flag_with_str<char>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in test-e8c2b0.o
"___cxa_end_catch", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in test-e8c2b0.o
boost::locale::basic_format<char>::format_guard::~format_guard() in test-e8c2b0.o
"___cxa_free_exception", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"___cxa_throw", referenced from:
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
"___gxx_personality_v0", referenced from:
_main in test-e8c2b0.o
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in test-e8c2b0.o
boost::locale::basic_format<char>::~basic_format() in test-e8c2b0.o
boost::locale::basic_message<char>::~basic_message() in test-e8c2b0.o
boost::locale::basic_format<char>::basic_format(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in test-e8c2b0.o
void std::__1::vector<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> > >::__push_back_slow_path<boost::locale::details::formattible<char> const>(boost::locale::details::formattible<char> const&) in test-e8c2b0.o
std::__1::__split_buffer<boost::locale::details::formattible<char>, std::__1::allocator<boost::locale::details::formattible<char> >&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<boost::locale::details::formattible<char> >&) in test-e8c2b0.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Not sure why I am getting a clang error when I am using gcc and why there is an error with 86_64.
Edit: with adding the commands recommended by #walnut now I am getting:
Desktop $ gcc -L"/usr/local/include/" test.cpp -lboost_serialization -lboost_locale
ld: library not found for -lboost_serialization
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I installed VTK on my mac successfully using the following steps
How to install VTK 6.1 for OSX 10.8 with Cocoa/XCode support?
I'm trying to use VTK and I'm getting a long list of errors that I'm not sure if it has to do with VTK or with gcc ?
This is part of the error I'm getting
There are some errors that are similar to this
Undefined symbols for architecture x86_64:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const", referenced from:
vtksys::SystemTools::GetFilenameName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libvtksys-6.1.a(SystemTools.cxx.o)
"std::__1::__vector_base_common<true>::__throw_out_of_range() const", referenced from:
std::__1::vector<vtkStdString*, std::__1::allocator<vtkStdString*> >::at(unsigned long) in libvtkCommonCore-6.1.a(vtkAbstractArray.cxx.o)
std::__1::vector<std::__1::pair<bool, vtkStdString>, std::__1::allocator<std::__1::pair<bool, vtkStdString> > >::at(unsigned long) in libvtkCommonDataModel-6.1.a(vtkDataSetAttributes.cxx.o)
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeES9_S9_ in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
...
"std::__1::locale::has_facet(std::__1::locale::id&) const", referenced from:
std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf() in libvtkIOImage-6.1.a(vtkImageWriter.cxx.o)
std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf() in libvtksys-6.1.a(SystemTools.cxx.o)
std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf() in libvtkCommonSystem-6.1.a(vtkTimerLog.cxx.o)
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonCore-6.1.a(vtkOutputWindow.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libvtkCommonCore-6.1.a(vtkOutputWindow.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonDataModel-6.1.a(vtkImageData.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libvtkCommonCore-6.1.a(vtkOStreamWrapper.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonCore-6.1.a(vtkOStreamWrapper.cxx.o)
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonCore-6.1.a(vtkOutputWindow.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libvtkCommonCore-6.1.a(vtkOutputWindow.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonDataModel-6.1.a(vtkImageData.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkIOImage-6.1.a(vtkPNGWriter.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in libvtkCommonCore-6.1.a(vtkOStreamWrapper.cxx.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libvtkCommonCore-6.1.a(vtkOStreamWrapper.cxx.o)
...
"std::logic_error::logic_error(char const*)", referenced from:
vtkUnicodeString::at(unsigned long) const in libvtkCommonCore-6.1.a(vtkUnicodeString.cxx.o)
and some errors that are similar to this
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char) in libvtksys-6.1.a(SystemTools.cxx.o)
std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libvtksys-6.1.a(SystemTools.cxx.o)
"std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
char vtkVariantStringToNumeric<char>(vtkStdString, bool*, char*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
float vtkVariantStringToNumeric<float>(vtkStdString, bool*, float*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
double vtkVariantStringToNumeric<double>(vtkStdString, bool*, double*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
unsigned char vtkVariantStringToNumeric<unsigned char>(vtkStdString, bool*, unsigned char*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
signed char vtkVariantStringToNumeric<signed char>(vtkStdString, bool*, signed char*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
short vtkVariantStringToNumeric<short>(vtkStdString, bool*, short*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
unsigned short vtkVariantStringToNumeric<unsigned short>(vtkStdString, bool*, unsigned short*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sync()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonExecutionModel-6.1.a(vtkExecutive.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkGarbageCollector.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtksys-6.1.a(SystemTools.cxx.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonExecutionModel-6.1.a(vtkExecutive.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkGarbageCollector.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtksys-6.1.a(SystemTools.cxx.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::uflow()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonExecutionModel-6.1.a(vtkExecutive.cxx.o)
vtable for std::__1::basic_filebuf<char, std::__1::char_traits<char> > in libvtkIOImage-6.1.a(vtkImageWriter.cxx.o)
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkGarbageCollector.cxx.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()", referenced from:
vtkOStrStreamWrapper::vtkOStrStreamWrapper() in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
vtkExecutive::CheckAlgorithm(char const*, vtkInformation*) in libvtkCommonExecutionModel-6.1.a(vtkExecutive.cxx.o)
std::__1::basic_filebuf<char, std::__1::char_traits<char> >::basic_filebuf() in libvtkIOImage-6.1.a(vtkImageWriter.cxx.o)
vtkGarbageCollectorImpl::PrintComponent(vtkGarbageCollectorImpl::ComponentType*) in libvtkCommonCore-6.1.a(vtkGarbageCollector.cxx.o)
vtkGarbageCollectorImpl::Report(vtkObjectBase*, void*, char const*) in libvtkCommonCore-6.1.a(vtkGarbageCollector.cxx.o)
vtkVariant::ToString() const in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
vtkStdString vtkVariantArrayToString<vtkArrayIteratorTemplate<double> >(vtkArrayIteratorTemplate<double>*) in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
"std::__1::cout", referenced from:
vtkPolyhedron::vtkInternal::ExtractContourConnectivities(vtkIdToIdVectorMapType&, std::__1::set<long long, std::__1::less<long long>, std::__1::allocator<long long> >&, std::__1::vector<long long, std::__1::allocator<long long> >&, vtkIdToIdVectorMapType&, vtkIdToIdVectorMapType&, vtkIdToIdVectorMapType&) in libvtkCommonDataModel-6.1.a(vtkPolyhedron.cxx.o)
"void std::__1::__sort<std::__1::__less<signed char, signed char>&, signed char*>(signed char*, signed char*, std::__1::__less<signed char, signed char>&)", referenced from:
vtkSortDataArray::Sort(vtkAbstractArray*) in libvtkCommonCore-6.1.a(vtkSortDataArray.cxx.o)
"typeinfo for std::__1::basic_istream<char, std::__1::char_traits<char> >", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkVariant.cxx.o)
>::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libvtkCommonCore-6.1.a(vtkOStrStreamWrapper.cxx.o)
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ofstream<char, std::__1::char_traits<char> > in libvtksys-6.1.a(SystemTools.cxx.o)
...
"_crc32", referenced from:
_vtk_png_reset_crc in libvtkpng-6.1.a(png.c.o)
_vtk_png_calculate_crc in libvtkpng-6.1.a(png.c.o)
"_deflate", referenced from:
_vtk_png_write_flush in libvtkpng-6.1.a(pngwrite.c.o)
_png_text_compress in libvtkpng-6.1.a(pngwutil.c.o)
_vtk_png_write_finish_row in libvtkpng-6.1.a(pngwutil.c.o)
_vtk_png_write_filtered_row in libvtkpng-6.1.a(pngwutil.c.o)
"_deflateEnd", referenced from:
_vtk_png_write_destroy in libvtkpng-6.1.a(pngwrite.c.o)
"_deflateInit2_", referenced from:
_vtk_png_write_IHDR in libvtkpng-6.1.a(pngwutil.c.o)
"_deflateReset", referenced from:
_png_write_compressed_data_out in libvtkpng-6.1.a(pngwutil.c.o)
_vtk_png_write_finish_row in libvtkpng-6.1.a(pngwutil.c.o)
"_inflateReset", referenced from:
_vtk_png_reset_zstream in libvtkpng-6.1.a(png.c.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [myCode] Error 1
Any tips would be helpful
It turns out I had to add the following two libraries -lc++ -lz. I found the answer in the following two links:
crc32() missing when building libzip on OSX 10.9
STD linker error with Apple LLVM 4.1
I have issues linking yaml-cpp code. The weird thing is that it is compiler dependent. I am using homebrew to get yaml-cpp and gcc-4.8 . I have a simple program
#include <yaml-cpp/yaml.h>
int main(){
YAML::Node yparams_;
yparams = YAML::LoadFile("test.yaml");
printf("all good\n");
return 0;
}
It compiles and runs fine, if I use the 'g++' provided with mac
g++ test.cpp $(pkg-config --cflags --libs yaml-cpp) -o test
However, exchanging 'g++' to the homebrewed 'g++-4.8' gives me a long list of linker errors (attached below). If I run 'brew doctor' I do not get any warning. 'brew info yaml-cpp' returns with:
yaml-cpp: stable 0.5.1
http://code.google.com/p/yaml-cpp/
/usr/local/Cellar/yaml-cpp/0.5.1 (40 files, 1.0M) *
Built from source with: --c++11
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/yaml-cpp.rb
==> Dependencies
Build: cmake ✔
Required: boost ✔
The output of 'brew info gcc' is
gcc: stable 4.8.3 (bottled), HEAD
http://gcc.gnu.org
/usr/local/Cellar/gcc/4.8.3_1 (1046 files, 184M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gcc.rb
==> Dependencies
Required: gmp ✔, libmpc ✔, mpfr ✔, cloog ✔, isl ✔
I appreciate any hint on how to fix this issue. Thanks!
"YAML::LoadFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
_main in ccG1oCNG.o
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
void std::__1::vector<YAML::detail::node*, std::__1::allocator<YAML::detail::node*> >::__push_back_slow_path<YAML::detail::node*>(YAML::detail::node*&&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeES9_S9_ in libyaml-cpp.a(node_data.cpp.o)
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::ios_base::getloc() const", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
YAML::Exception::Exception(YAML::Mark const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:
YAML::BadSubscript::BadSubscript() in libyaml-cpp.a(node_data.cpp.o)
YAML::BadPushback::BadPushback() in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)", referenced from:
std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::resize(unsigned long, char)", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::overflow(int) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char)", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::overflow(int) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
YAML::Exception::Exception(YAML::Mark const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
boost::detail::shared_count::shared_count<YAML::detail::node_data>(YAML::detail::node_data*) in libyaml-cpp.a(memory.cpp.o)
boost::detail::sp_counted_impl_p<YAML::detail::node_data>::dispose() in libyaml-cpp.a(memory.cpp.o)
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
YAML::BadPushback::~BadPushback() in libyaml-cpp.a(node_data.cpp.o)
YAML::BadSubscript::~BadSubscript() in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
YAML::detail::node_data::set_tag(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
YAML::detail::node_data::set_scalar(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
YAML::detail::node_ref::set_scalar(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)", referenced from:
YAML::Exception::build_what(YAML::Mark const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(unsigned long)", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
...
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sync()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::uflow()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setbuf(char*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsgetn(char*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsputn(char const*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::showmanyc()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
YAML::Exception::build_what(YAML::Mark const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::~basic_streambuf()", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
...
"std::__1::ctype<char>::id", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::locale::~locale()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::ios_base::init(void*)", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
YAML::Exception::build_what(YAML::Mark const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) in libyaml-cpp.a(node_data.cpp.o)
"std::__1::basic_ios<char, std::__1::char_traits<char> >::~basic_ios()", referenced from:
YAML::detail::node_data::convert_sequence_to_map(boost::shared_ptr<YAML::detail::memory_holder>) in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
non-virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringstream() in libyaml-cpp.a(node_data.cpp.o)
...
"typeinfo for std::__1::basic_istream<char, std::__1::char_traits<char> >", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"typeinfo for std::__1::basic_ostream<char, std::__1::char_traits<char> >", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"typeinfo for std::__1::basic_iostream<char, std::__1::char_traits<char> >", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
typeinfo for std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"typeinfo for std::__1::basic_streambuf<char, std::__1::char_traits<char> >", referenced from:
typeinfo for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"non-virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"non-virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_istream<char, std::__1::char_traits<char> >::~basic_istream()", referenced from:
construction vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
"virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits<char> >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits<char> >-in-std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libyaml-cpp.a(node_data.cpp.o)
I have made an iPhone app in Xcode that uses the DropBox API. I have got 23 errors all named Apple Mach-O Linker Errors. I have linked my binary with the dropbox library as well as: SystemConfiguration, QuartzCore, Security, CFNetwork, CoreGraphics, UIKit and Foundation. I am not using all of those frameworks but DropBox told me I must import some of them, and I am using the rest.
What should I do?
Here is one of the errors:
Ld /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Products/Debug-iphoneos/SnapDrop.app/SnapDrop normal armv7
cd /Users/Zach/Desktop/SnapDrop
setenv IPHONEOS_DEPLOYMENT_TARGET 7.0
setenv PATH "/Applications/Xcode5-DP3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode5-DP3.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode5-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode5-DP3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Products/Debug-iphoneos -F/Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Products/Debug-iphoneos -F/Users/Zach/Desktop/SnapDrop -F/Users/Zach/Desktop/SnapDrop/../../Downloads/dropbox-ios-sync-sdk-1-1.1.0 -filelist /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Intermediates/SnapDrop.build/Debug-iphoneos/SnapDrop.build/Objects-normal/armv7/SnapDrop.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework Dropbox -framework QuartzCore -framework SystemConfiguration -framework Security -framework CFNetwork -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Intermediates/SnapDrop.build/Debug-iphoneos/SnapDrop.build/Objects-normal/armv7/SnapDrop_dependency_info.dat -o /Users/Zach/Library/Developer/Xcode/DerivedData/SnapDrop-fwhwffwawcnkfwbxvokogcjaaahb/Build/Products/Debug-iphoneos/SnapDrop.app/SnapDrop
Undefined symbols for architecture armv7:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)", referenced from:
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_url_encode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Dropbox(util.o)
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
"operator new(unsigned long)", referenced from:
std::__1::__function::__func<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'(), std::__1::allocator<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'()>, void ()>::__clone() const in Dropbox(env.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::reserve(unsigned long)", referenced from:
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_url_encode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Dropbox(util.o)
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
"std::__1::chrono::system_clock::now()", referenced from:
std::__1::cv_status std::__1::condition_variable::wait_for<long long, std::__1::ratio<1ll, 1000ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000ll> > const&) in Dropbox(sync.o)
std::__1::cv_status std::__1::condition_variable::wait_for<long, std::__1::ratio<3600ll, 1ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long, std::__1::ratio<3600ll, 1ll> > const&) in Dropbox(api.o)
"std::__1::chrono::steady_clock::now()", referenced from:
std::__1::cv_status std::__1::condition_variable::wait_for<long long, std::__1::ratio<1ll, 1000ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000ll> > const&) in Dropbox(sync.o)
std::__1::cv_status std::__1::condition_variable::wait_for<long, std::__1::ratio<3600ll, 1ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long, std::__1::ratio<3600ll, 1ll> > const&) in Dropbox(api.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)", referenced from:
dbx_access_info::is_valid(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) const in Dropbox(sync.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
"std::__1::__throw_system_error(int, char const*)", referenced from:
std::__1::unique_lock<std::__1::mutex>::unlock() in Dropbox(transfer.o)
std::__1::unique_lock<std::__1::mutex>::lock() in Dropbox(transfer.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)", referenced from:
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
"std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)", referenced from:
LifecycleManager::shutdown() in Dropbox(init.o)
dbx_env::log_upload_thread() in Dropbox(env.o)
"std::nothrow", referenced from:
_dropbox_env_init in Dropbox(init.o)
_dropbox_account_init in Dropbox(init.o)
HttpRequester::create(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*)) in Dropbox(env.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
ThreadLocal<dbx_error_buf>::get() in Dropbox(util.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
dbx_env::~dbx_env() in Dropbox(init.o)
build_authed_url(dbx_account const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(api.o)
dbx_request_json(dbx_account*, HttpRequester&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, char const*, int, std::initializer_list<int> const&, std::__1::unique_ptr<json_t, json_deleter>&) in Dropbox(api.o)
_dropbox_api_unlink in Dropbox(api.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_upload_log_file(dbx_env const*, HttpRequester&, char const*, long long, long long, char const*, long long) in Dropbox(api.o)
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
...
"std::__1::condition_variable::notify_all()", referenced from:
LifecycleManager::kick_cvars() in Dropbox(init.o)
LifecycleManager::ThreadRegistration::~ThreadRegistration() in Dropbox(transfer.o)
LifecycleManager::ThreadRegistration::ThreadRegistration(LifecycleManager&) in Dropbox(transfer.o)
dbx_env::dump_log_buffer() const in Dropbox(env.o)
dbx_env::log_upload_thread() in Dropbox(env.o)
"std::__1::condition_variable::~condition_variable()", referenced from:
_dropbox_account_init in Dropbox(init.o)
_dropbox_account_destroy in Dropbox(init.o)
dbx_env::~dbx_env() in Dropbox(init.o)
__GLOBAL__I_a in Dropbox(env.o)
"std::__1::mutex::unlock()", referenced from:
_dropbox_set_online in Dropbox(init.o)
_dropbox_lib_setup in Dropbox(init.o)
_dropbox_env_shutdown in Dropbox(init.o)
_dropbox_account_init in Dropbox(init.o)
_dropbox_account_shutdown in Dropbox(init.o)
void LifecycleManager::all_lock_helper<void, dropbox_set_online::$_0>(vq_node<std::__1::mutex&>*, dropbox_set_online::$_0) in Dropbox(init.o)
LifecycleManager::shutdown() in Dropbox(init.o)
...
"operator new(unsigned long, std::nothrow_t const&)", referenced from:
_dropbox_env_init in Dropbox(init.o)
_dropbox_account_init in Dropbox(init.o)
HttpRequester::create(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*)) in Dropbox(env.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
ThreadLocal<dbx_error_buf>::get() in Dropbox(util.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char)", referenced from:
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_url_encode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Dropbox(util.o)
dbx_build_url_with_params(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(util.o)
"std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000000ll> > >)", referenced from:
std::__1::cv_status std::__1::condition_variable::wait_for<long long, std::__1::ratio<1ll, 1000ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000ll> > const&) in Dropbox(sync.o)
std::__1::cv_status std::__1::condition_variable::wait_for<long, std::__1::ratio<3600ll, 1ll> >(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::duration<long, std::__1::ratio<3600ll, 1ll> > const&) in Dropbox(api.o)
"std::__1::mutex::~mutex()", referenced from:
_dropbox_account_init in Dropbox(init.o)
_dropbox_account_destroy in Dropbox(init.o)
dbx_env::~dbx_env() in Dropbox(init.o)
__GLOBAL__I_a in Dropbox(init.o)
__GLOBAL__I_a in Dropbox(env.o)
"operator delete(void*)", referenced from:
_dropbox_env_destroy in Dropbox(init.o)
_dropbox_account_init in Dropbox(init.o)
_dropbox_account_destroy in Dropbox(init.o)
dbx_env::log_upload_thread() in Dropbox(env.o)
std::__1::__function::__func<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'(), std::__1::allocator<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'()>, void ()>::~__func() in Dropbox(env.o)
std::__1::__function::__func<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'(), std::__1::allocator<HttpRequester::HttpRequester(dbx_env*, LifecycleManager&, std::__1::mutex*, void*, void (*)(void*), void*)::'lambda'()>, void ()>::destroy_deallocate() in Dropbox(env.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned long)", referenced from:
dbx_env::dbx_env(dbx_http const*, dbx_env_config const*) in Dropbox(init.o)
build_authed_url(dbx_account const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(api.o)
_dropbox_api_unlink in Dropbox(api.o)
dbx_api_account_info(dbx_account*, std::__1::unique_ptr<dbx_account_info, dbx_account_info_deleter>*, std::__1::unique_ptr<dbx_access_info, std::__1::default_delete<dbx_access_info> >*, HttpRequester&, int) in Dropbox(api.o)
dbx_upload_log_file(dbx_env const*, HttpRequester&, char const*, long long, long long, char const*, long long) in Dropbox(api.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
build_authed_url(dbx_account const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::initializer_list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&) in Dropbox(api.o)
dbx_upload_log_file(dbx_env const*, HttpRequester&, char const*, long long, long long, char const*, long long) in Dropbox(api.o)
"std::__1::mutex::lock()", referenced from:
_dropbox_set_online in Dropbox(init.o)
_dropbox_lib_setup in Dropbox(init.o)
_dropbox_env_shutdown in Dropbox(init.o)
_dropbox_account_init in Dropbox(init.o)
_dropbox_account_shutdown in Dropbox(init.o)
void LifecycleManager::all_lock_helper<void, dropbox_set_online::$_0>(vq_node<std::__1::mutex&>*, dropbox_set_online::$_0) in Dropbox(init.o)
LifecycleManager::shutdown() in Dropbox(init.o)
...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You didn't mention adding libc++.dylib. Per https://www.dropbox.com/developers/sync/sdks/ios:
Ensure that you have CFNetwork.framework, Security.framework,
SystemConfiguration.framework, QuartzCore.framework, and libc++.dylib
added to your project. To do this, select your project file in the
file explorer, select your target, and select the Build Phases
sub-tab. Under Link Binary with Libraries, press the + button, select
CFNetwork.framework, and press Add. Repeat for Security.framework,
SystemConfiguration.framework, QuartzCore.framework, and libc++.dylib.
Please let me know if there are setup instructions somewhere that don't mention libc++.dylib.
You could try to add libstdc++.dylib.