Linking error when I integrate c++ library in ios - c++

This is my file tree in the project
And the error is appeared like below
Ld /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Products/Release-iphoneos/face-recog-test9.app/face-recog-test9 normal arm64 (in target 'face-recog-test9' from project 'face-recog-test9')
cd /Users/chanwoo/Documents/Repositories/resonance/ios_projects/face-recog-test9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios13.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -L/Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Products/Release-iphoneos -L/Users/chanwoo/Documents/Repositories/resonance/ios_projects/face-recog-test9/lib/ -F/Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Products/Release-iphoneos -filelist /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Intermediates.noindex/face-recog-test9.build/Release-iphoneos/face-recog-test9.build/Objects-normal/arm64/face-recog-test9.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Intermediates.noindex/face-recog-test9.build/Release-iphoneos/face-recog-test9.build/Objects-normal/arm64/face-recog-test9_lto.o -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Intermediates.noindex/face-recog-test9.build/Release-iphoneos/face-recog-test9.build/Objects-normal/arm64/face_recog_test9.swiftmodule -Xlinker -dependency_info -Xlinker /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Intermediates.noindex/face-recog-test9.build/Release-iphoneos/face-recog-test9.build/Objects-normal/arm64/face-recog-test9_dependency_info.dat -o /Users/chanwoo/Library/Developer/Xcode/DerivedData/face-recog-test9-fauksbwwzfttmcdxrlvcyghtcloj/Build/Products/Release-iphoneos/face-recog-test9.app/face-recog-test9
Undefined symbols for architecture arm64:
"dlib::scrollable_region::set_total_rect_size(unsigned long, unsigned long)", referenced from:
void dlib::image_display::set_image<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
"dlib::base_window::close_window()", referenced from:
dlib::drawable_window::~drawable_window() in Test.o
"dlib::image_display::get_image_display_rect() const", referenced from:
void dlib::image_window::set_image<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
void dlib::image_window::set_image<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_window::set_image<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_window::set_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
"dlib::base_window::invalidate_rectangle(dlib::rectangle const&)", referenced from:
dlib::image_display::disable_overlay_editing() in Test.o
void dlib::image_display::set_image<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
"dlib::base_window::base_window(bool, bool)", referenced from:
dlib::drawable_window::drawable_window(bool, bool) in Test.o
"dlib::base_window::~base_window()", referenced from:
dlib::drawable_window::drawable_window(bool, bool) in Test.o
dlib::drawable_window::~drawable_window() in Test.o
"dlib::base_window::set_size(int, int)", referenced from:
void dlib::image_window::set_image<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
void dlib::image_window::set_image<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_window::set_image<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_window::set_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
"vtable for dlib::image_window", referenced from:
dlib::image_window::image_window<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"dlib::base_window::set_title(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
dlib::image_window::image_window<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
dlib::image_window::image_window<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
"dlib::entropy_decoder_kernel_2::decode(unsigned int, unsigned int)", referenced from:
dlib::entropy_decoder_model_kernel_5<256ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in Test.o
dlib::entropy_decoder_model_kernel_4<256ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in Test.o
"dlib::entropy_decoder_kernel_2::get_target(unsigned int)", referenced from:
dlib::entropy_decoder_model_kernel_5<256ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in Test.o
dlib::entropy_decoder_model_kernel_4<256ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in Test.o
"vtable for dlib::drawable_window", referenced from:
dlib::drawable_window::drawable_window(bool, bool) in Test.o
dlib::drawable_window::~drawable_window() in Test.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"dlib::entropy_decoder_kernel_2::entropy_decoder_kernel_2()", referenced from:
void dlib::load_dng<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_istream<char, std::__1::char_traits<char> >&) in Test.o
"dlib::base_window::wait_until_closed() const", referenced from:
Test::test(int, char**) in Test.o
"dlib::popup_menu_region::disable()", referenced from:
void dlib::image_display::set_image<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
void dlib::image_display::set_image<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&) in Test.o
"dlib::image_window::get_next_double_click(dlib::vector<long, 2l>&, unsigned long&)", referenced from:
Test::test(int, char**) in Test.o
"_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_", referenced from:
__GLOBAL__sub_I_Test.cpp in Test.o
"dlib::entropy_decoder_kernel_2::set_stream(std::__1::basic_istream<char, std::__1::char_traits<char> >&)", referenced from:
void dlib::load_dng<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_istream<char, std::__1::char_traits<char> >&) in Test.o
"dlib::image_display::~image_display()", referenced from:
dlib::image_window::image_window<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
"dlib::image_window::~image_window()", referenced from:
Test::test(int, char**) in Test.o
"dlib::image_display::image_display(dlib::drawable_window&)", referenced from:
dlib::image_window::image_window<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
"dlib::entropy_decoder_kernel_2::~entropy_decoder_kernel_2()", referenced from:
void dlib::load_dng<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> >&, std::__1::basic_istream<char, std::__1::char_traits<char> >&) in Test.o
"Test::add(int, int)", referenced from:
-[Wrapper add_wrapper:add:] in example.o
"dlib::image_window::on_image_clicked(dlib::vector<long, 2l> const&, bool, unsigned long)", referenced from:
dlib::image_window::image_window<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_heatmap<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > >(dlib::matrix_op<dlib::op_jet<dlib::array2d<unsigned char, dlib::memory_manager_stateless_kernel_1<char> > > > const&) in Test.o
dlib::image_window::image_window<dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > >(dlib::array2d<dlib::rgb_pixel, dlib::memory_manager_stateless_kernel_1<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Test.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
First of all, I have no idea how does Xcode's linker find exactly body in libdlib.a though I didn't put the full path of it
library search path: $(PROJECT_DIR)/lib
I want to call the function from dlib in Testcpp source and wrap it using example source and finally invoke to swift code
What is wrong with it?
Env.
Mac (OSX) Catalina 10.15.4
SwiftUI (working with)
XCode 11.4
iPhone 6S
IOS 13.4.1

This error:
Undefined symbols for architecture arm64
means that the library you're trying to integrate is built for an architecture different from arm64, the one you're trying to run on. You need to rebuild the C++ library to arm64 then integrate it.

Related

Boost log linking error on OSX

I've been trying to compile the following example program from the boost tutorial to create a logger all morning and can't work out what I'm doing wrong:
#include <boost/log/common.hpp>
#include <boost/log/sinks.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/expressions.hpp>
#include <boost/core/null_deleter.hpp>
#include <boost/shared_ptr.hpp>
#include <iostream>
using namespace boost::log;
BOOST_LOG_ATTRIBUTE_KEYWORD(severity, "Severity", int)
int main()
{
typedef sinks::asynchronous_sink<sinks::text_ostream_backend> text_sink;
boost::shared_ptr<text_sink> sink = boost::make_shared<text_sink>();
boost::shared_ptr<std::ostream> stream{&std::clog,
boost::null_deleter{}};
sink->locked_backend()->add_stream(stream);
sink->set_filter(severity > 0);
sink->set_formatter(expressions::stream << severity << ": " <<
expressions::smessage);
core::get()->add_sink(sink);
sources::severity_logger<int> lg;
BOOST_LOG_SEV(lg, 0) << "note";
BOOST_LOG_SEV(lg, 1) << "warning";
BOOST_LOG_SEV(lg, 2) << "error";
sink->flush();
}
using the following commands:
clang -std=c++11 -c ./test.cpp -Wall -DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK -DBOOST_LOG_DYN_LINK
clang test.o -o test -DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK -DBOOST_LOG_DYN_LINK
And I'm met with a massive error message that ends like this:
vtable for boost::log::v2s_mt_posix::attribute::impl in test-7198fd.o
vtable for boost::detail::sp_counted_base in test-7198fd.o
vtable for boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char> in test-7198fd.o
vtable for boost::log::v2s_mt_posix::sinks::basic_sink_frontend in test-7198fd.o
vtable for boost::log::v2s_mt_posix::sinks::sink in test-7198fd.o
vtable for boost::detail::tss_cleanup_function in test-7198fd.o
...
"___cxa_rethrow", referenced from:
boost::detail::shared_count::shared_count<boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue>*, boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue> > >(boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue>*, boost::detail::sp_inplace_tag<boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue> > >) in test-7198fd.o
boost::log::v2s_mt_posix::sinks::basic_sink_frontend::will_consume(boost::log::v2s_mt_posix::attribute_value_set const&) in test-7198fd.o
boost::log::v2s_mt_posix::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&>) const in test-7198fd.o
boost::detail::shared_count::shared_count<boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::delete_data*, boost::detail::do_heap_delete<boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::delete_data> >(boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::delete_data*, boost::detail::do_heap_delete<boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::delete_data>) in test-7198fd.o
boost::log::v2s_mt_posix::aux::threadsafe_queue<boost::log::v2s_mt_posix::record_view, std::__1::allocator<void> >::threadsafe_queue(std::__1::allocator<boost::log::v2s_mt_posix::aux::threadsafe_queue_types<boost::log::v2s_mt_posix::record_view, std::__1::allocator<void> >::node> const&) in test-7198fd.o
boost::detail::shared_count::shared_count<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>*, boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> > >(boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>*, boost::detail::sp_inplace_tag<boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> > >) in test-7198fd.o
void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::log::v2s_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&) in test-7198fd.o
...
"___cxa_throw", referenced from:
boost::log::v2s_mt_posix::aux::threadsafe_queue<boost::log::v2s_mt_posix::record_view, std::__1::allocator<void> >::threadsafe_queue(std::__1::allocator<boost::log::v2s_mt_posix::aux::threadsafe_queue_types<boost::log::v2s_mt_posix::record_view, std::__1::allocator<void> >::node> const&) in test-7198fd.o
void boost::throw_exception<boost::thread_resource_error>(boost::thread_resource_error const&) in test-7198fd.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >::rethrow() const in test-7198fd.o
void boost::throw_exception<boost::lock_error>(boost::lock_error const&) in test-7198fd.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >::rethrow() const in test-7198fd.o
void boost::throw_exception<boost::condition_error>(boost::condition_error const&) in test-7198fd.o
boost::detail::interruption_checker::check_for_interruption() in test-7198fd.o
...
"___gxx_personality_v0", referenced from:
_main in test-7198fd.o
boost::system::system_error::what() const in test-7198fd.o
boost::detail::sp_if_not_array<boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue> >::type boost::make_shared<boost::log::v2s_mt_posix::sinks::asynchronous_sink<boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2s_mt_posix::sinks::unbounded_fifo_queue> >() in test-7198fd.o
void boost::log::v2s_mt_posix::sinks::basic_sink_frontend::set_filter<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<int, boost::log::v2s_mt_posix::fallback_to_none, tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<int>, 0l> > >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<int, boost::log::v2s_mt_posix::fallback_to_none, tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<int>, 0l> > >, 2l> > const&) in test-7198fd.o
void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::set_formatter<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::argument<2> >, 0l> >, boost::log::v2s_mt_posix::expressions::attribute_actor<int, boost::log::v2s_mt_posix::fallback_to_none, tag::severity, boost::phoenix::actor> >, 2l> >, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::expressions::attribute_actor<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::expressions::tag::smessage, boost::phoenix::actor> >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left, boost::proto::argsns_::list2<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::argument<2> >, 0l> >, boost::log::v2s_mt_posix::expressions::attribute_actor<int, boost::log::v2s_mt_posix::fallback_to_none, tag::severity, boost::phoenix::actor> >, 2l> >, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::expressions::attribute_actor<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::expressions::tag::smessage, boost::phoenix::actor> >, 2l> > const&) in test-7198fd.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger<int> >::stream() const in test-7198fd.o
boost::detail::shared_count::~shared_count() in test-7198fd.o
...
ld: symbol(s) not found for architecture x86_64
Boost was installed using:
brew install boost --c++11
Any ideas what's going on?
UPDATE
Having accidentally tried to compile the code in C as pointed out by gavinb, I've tried to recompile using the correct c++ compiler:
c++ -std=c++11 -c ./test.cpp -Wall -DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK -DBOOST_LOG_DYN_LINK
c++ test.o -o test -DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK -DBOOST_LOG_DYN_LINK
and now receive the following error:
st::thread_specific_ptr<boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::get() const in test.o
"boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)", referenced from:
boost::thread_specific_ptr<boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::reset(boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context*) in test.o
boost::thread_specific_ptr<boost::log::v2_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::~thread_specific_ptr() in test.o
"boost::detail::thread_data_base::~thread_data_base()", referenced from:
boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue> >, boost::_bi::list1<boost::_bi::value<boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue>*> > > >::~thread_data() in test.o
"boost::detail::get_current_thread_data()", referenced from:
boost::detail::interruption_checker::interruption_checker(_opaque_pthread_mutex_t*, _opaque_pthread_cond_t*) in test.o
"boost::system::system_category()", referenced from:
___cxx_global_var_init2 in test.o
boost::thread_exception::thread_exception(int, char const*) in test.o
boost::condition_error::condition_error(int, char const*) in test.o
"boost::system::generic_category()", referenced from:
___cxx_global_var_init in test.o
___cxx_global_var_init1 in test.o
"boost::thread::join_noexcept()", referenced from:
boost::thread::join() in test.o
"boost::thread::native_handle()", referenced from:
boost::thread::get_id() const in test.o
"boost::thread::start_thread_noexcept()", referenced from:
boost::thread::start_thread() in test.o
"boost::thread::detach()", referenced from:
boost::thread::~thread() in test.o
"boost::thread::thread()", referenced from:
boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue>::asynchronous_sink(bool) in test.o
"boost::log::v2_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2_mt_posix::visitation_result boost::log::v2_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >, boost::log::v2_mt_posix::fallback_to_none>::operator()<boost::log::v2_mt_posix::binder1st<boost::log::v2_mt_posix::output_fun, boost::log::v2_mt_posix::expressions::aux::stream_ref<boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&> >(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&, boost::log::v2_mt_posix::binder1st<boost::log::v2_mt_posix::output_fun, boost::log::v2_mt_posix::expressions::aux::stream_ref<boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&>) const in test.o
boost::log::v2_mt_posix::value_extractor<int, boost::log::v2_mt_posix::fallback_to_none, tag::severity>::operator()(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&) const in test.o
boost::log::v2_mt_posix::value_extractor<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::log::v2_mt_posix::fallback_to_none, boost::log::v2_mt_posix::expressions::tag::smessage>::operator()(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&) const in test.o
"boost::log::v2_mt_posix::attribute_value_set::find(boost::log::v2_mt_posix::attribute_name) const", referenced from:
boost::log::v2_mt_posix::visitation_result boost::log::v2_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > >, boost::log::v2_mt_posix::fallback_to_none>::operator()<boost::log::v2_mt_posix::binder1st<boost::log::v2_mt_posix::output_fun, boost::log::v2_mt_posix::expressions::aux::stream_ref<boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&> >(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&, boost::log::v2_mt_posix::binder1st<boost::log::v2_mt_posix::output_fun, boost::log::v2_mt_posix::expressions::aux::stream_ref<boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&>) const in test.o
boost::log::v2_mt_posix::value_extractor<int, boost::log::v2_mt_posix::fallback_to_none, tag::severity>::operator()(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&) const in test.o
boost::log::v2_mt_posix::value_extractor<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::log::v2_mt_posix::fallback_to_none, boost::log::v2_mt_posix::expressions::tag::smessage>::operator()(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute_value_set const&) const in test.o
"boost::log::v2_mt_posix::aux::once_block_sentry::enter_once_block() const", referenced from:
boost::log::v2_mt_posix::aux::once_block_sentry::executed() const in test.o
"boost::log::v2_mt_posix::core::get_logging_enabled() const", referenced from:
boost::log::v2_mt_posix::record boost::log::v2_mt_posix::sources::basic_composite_logger<char, boost::log::v2_mt_posix::sources::severity_logger<int>, boost::log::v2_mt_posix::sources::single_thread_model, boost::log::v2_mt_posix::sources::features<boost::log::v2_mt_posix::sources::severity<int> > >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2_mt_posix::keywords::tag::severity, int const> >(boost::parameter::aux::tagged_argument<boost::log::v2_mt_posix::keywords::tag::severity, int const> const&) in test.o
"boost::thread::joinable() const", referenced from:
boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue>::flush() in test.o
boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue>::stop() in test.o
"typeinfo for boost::detail::thread_data_base", referenced from:
typeinfo for boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue> >, boost::_bi::list1<boost::_bi::value<boost::log::v2_mt_posix::sinks::asynchronous_sink<boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>, boost::log::v2_mt_posix::sinks::unbounded_fifo_queue>*> > > > in test.o
"vtable for boost::detail::thread_data_base", referenced from:
boost::detail::thread_data_base::thread_data_base() in test.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Finally found a command that solved the problem:
clang++ -std=c++11 -DBOOST_LOG_DYN_LINK ./test.cpp -o test -lboost_log-mt -lpthread -lboost_thread-mt -lboost_system-mt
These symbols belong to the C++ runtime:
___cxa_throw
___gxx_personality_v0
When the linker complains these are missing, it is because you are linking the app as a C app rather than a C++ app.
Rather than invoking clang, just use c++ for both compiling and linking and it should work.
Some Boost libraries are header-only (being heavily templated), which means the implementation is completely provided by headers and thus does not require linking a separate library. But some Boost libraries (check the documentation as this is specifically noted) require linking a .so or .dylib for the implementation. This requires specifying the library name with the -l flag, such as -lboost_thread-mt and possibly the -L flag if the libraries aren't on your library path.
In your case, both the threading and logging libraries need their own libraries added to the link stage, and these also depend on the system library (a common/shared library). As you discovered, this means adding the following to the link phase:
-lpthread -lboost_log-mt -lboost_thread-mt -lboost_system-mt

boost regex built failed on MacOX

On Linux machine, my code could build successfully.
However, on my Mac, the same command cannot build unless I take out this part:
void split_is(const std::string &s, string delim_regex, std::vector<std::string> &elems) {
// Terribly slow and inefficient, sorry. Should probably fix this at some point
boost::algorithm::split_regex(elems, s, regex(delim_regex));
std::vector<std::string> non_zero_elems;
for(int e = 0; e < elems.size(); e++){
if (elems[e].length() > 0){
non_zero_elems.push_back(elems[e]);
}
}
elems = non_zero_elems; }
The command I used is:
g++ -lboost_regex -lgurobi_c++ -lgurobi60 -stdlib=libstdc++ -lpthread
-lm -Wall -m64 -fPIE -fexceptions -frounding-math -O2 -I/Library/gurobi604/mac64/include/ -I/usr/local/include/ -L/Library/gurobi604/mac64/lib/ -L/usr/local/lib/ main.cpp tools.cpp treeofdevil.cpp solver.cpp periodicfunction.cpp -o ising.exe /usr/local/lib/libboost_regex.a
Does anyone know what might possibly go wrong? Thank you.
The error I get is:
Undefined symbols for architecture x86_64:
"boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > > const&)", referenced from:
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_prefix() in tools-9bd02e.o
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_match() in tools-9bd02e.o
"boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)", referenced from:
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(__gnu_cxx::__normal_iterator<char const*, std::string>, __gnu_cxx::__normal_iterator<char const*, std::string>, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, __gnu_cxx::__normal_iterator<char const*, std::string>) in tools-9bd02e.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
unsigned int boost::re_detail::find_sort_syntax<boost::re_detail::cpp_regex_traits_implementation<char>, char>(boost::re_detail::cpp_regex_traits_implementation<char> const*, char*) in libboost_regex.a(instances.o)
char const* boost::re_detail::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in libboost_regex.a(instances.o)
char* boost::re_detail::re_is_set_member<char*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char*, char*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in libboost_regex.a(instances.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
void std::__1::vector<boost::re_detail::recursion_info<boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > > >, std::__1::allocator<boost::re_detail::recursion_info<boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > > > > >::__push_back_slow_path<boost::re_detail::recursion_info<boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > > > const>(boost::re_detail::recursion_info<boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > > > const&) in libboost_regex.a(instances.o)
std::__1::vector<boost::sub_match<char const*>, std::__1::allocator<boost::sub_match<char const*> > >::vector(std::__1::vector<boost::sub_match<char const*>, std::__1::allocator<boost::sub_match<char const*> > > const&) in libboost_regex.a(instances.o)
std::__1::vector<boost::sub_match<char const*>, std::__1::allocator<boost::sub_match<char const*> > >::insert(std::__1::__wrap_iter<boost::sub_match<char const*> const*>, unsigned long, boost::sub_match<char const*> const&) in libboost_regex.a(instances.o)
std::__1::enable_if<(__is_forward_iterator<boost::sub_match<char const*>*>::value) && (is_constructible<boost::sub_match<char const*>, std::__1::iterator_traits<boost::sub_match<char const*>*>::reference>::value), void>::type std::__1::vector<boost::sub_match<char const*>, std::__1::allocator<boost::sub_match<char const*> > >::assign<boost::sub_match<char const*>*>(boost::sub_match<char const*>*, boost::sub_match<char const*>*) in libboost_regex.a(instances.o)
std::__1::vector<bool, std::__1::allocator<bool> >::assign(unsigned long, bool const&) in libboost_regex.a(instances.o)
std::__1::vector<bool, std::__1::allocator<bool> >::reserve(unsigned long) in libboost_regex.a(instances.o)
void std::__1::vector<std::__1::pair<bool, boost::re_detail::re_syntax_base*>, std::__1::allocator<std::__1::pair<bool, boost::re_detail::re_syntax_base*> > >::__push_back_slow_path<std::__1::pair<bool, boost::re_detail::re_syntax_base*> const>(std::__1::pair<bool, boost::re_detail::re_syntax_base*> const&) in libboost_regex.a(instances.o)
...
"std::__1::__vector_base_common<true>::__throw_out_of_range() const", referenced from:
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse_open_paren() in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse_perl_extension() in libboost_regex.a(instances.o)
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::lookup_collatename(char const*, char const*) const in libboost_regex.a(instances.o)
boost::re_detail::cpp_regex_traits_implementation<char>::lookup_classname_imp(char const*, char const*) const in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_constants::error_type, long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long) in libboost_regex.a(instances.o)
boost::re_detail::cpp_regex_traits_implementation<char>::lookup_classname(char const*, char const*) const in libboost_regex.a(instances.o)
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
boost::re_detail::cpp_regex_traits_base<char>::imbue(std::__1::locale const&) in libboost_regex.a(instances.o)
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const> boost::re_detail::create_cpp_regex_traits<char>(std::__1::locale const&) in libboost_regex.a(instances.o)
"std::__1::ios_base::getloc() const", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
"std::logic_error::logic_error(char const*)", referenced from:
boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > >::raise_logic_error() in libboost_regex.a(instances.o)
"std::logic_error::logic_error(char const*)", referenced from:
boost::re_detail::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags) in libboost_regex.a(instances.o)
"std::logic_error::logic_error(std::logic_error const&)", referenced from:
void boost::throw_exception<std::invalid_argument>(std::invalid_argument const&) in libboost_regex.a(instances.o)
void boost::throw_exception<std::logic_error>(std::logic_error const&) in libboost_regex.a(instances.o)
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >::rethrow() const in libboost_regex.a(instances.o)
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >::clone_impl(boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> > const&, boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >::clone_tag) in libboost_regex.a(instances.o)
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >::clone_impl(boost::exception_detail::error_info_injector<std::logic_error> const&) in libboost_regex.a(instances.o)
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >::rethrow() const in libboost_regex.a(instances.o)
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >::clone_impl(boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> > const&, boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >::clone_tag) in libboost_regex.a(instances.o)
...
"std::runtime_error::runtime_error(char const*)", referenced from:
boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long) in libboost_regex.a(instances.o)
"std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, ...
boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const in libboost_regex.a(instances.o)
boost::re_detail::cpp_regex_traits_implementation<char>::lookup_collatename(char const*, char const*) const in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::append_set(boost::re_detail::basic_char_set<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, mpl_::bool_<false>*) in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)", referenced from:
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_constants::error_type, long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long) in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)", referenced from:
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_constants::error_type, long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long) in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(unsigned long, char)", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*, unsigned long)", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(unsigned long, char)", referenced from:
char const* boost::re_detail::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in libboost_regex.a(instances.o)
char* boost::re_detail::re_is_set_member<char*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char*, char*, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::insert(std::__1::__wrap_iter<char const*>, char)", referenced from:
boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::append_set(boost::re_detail::basic_char_set<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, mpl_::bool_<false>*) in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::reserve(unsigned long)", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const in libboost_regex.a(instances.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const in libboost_regex.a(instances.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::re_detail::cpp_regex_traits_implementation<char>::lookup_collatename(char const*, char const*) const in libboost_regex.a(instances.o)
boost::cpp_regex_traits<char>::catalog_name(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libboost_regex.a(instances.o)
boost::cpp_regex_traits<char>::get_catalog_name() in libboost_regex.a(instances.o)
boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse(char const*, char const*, unsigned int) in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_constants::error_type, long) in libboost_regex.a(instances.o)
boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse_extended() in libboost_regex.a(instances.o)
...
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const in libboost_regex.a(instances.o)
boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const in libboost_regex.a(instances.o)
.....const in libboost_regex.a(instances.o)
boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::imbue(std::__1::locale) in libboost_regex.a(instances.o)
boost::cpp_regex_traits<char>::imbue(std::__1::locale) in libboost_regex.a(instances.o)
boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const> boost::re_detail::create_cpp_regex_traits<char>(std::__1::locale const&) in libboost_regex.a(instances.o)
boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long) in libboost_regex.a(instances.o)
unsigned long std::__1::__tree<std::__1::__value_type<boost::re_detail::cpp_regex_traits_base<char>, std::__1::__list_iterator<std::__1::pair<boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const>, boost::re_detail::cpp_regex_traits_base<char> const*>, void*> >, std::__1::__map_value_compare<boost::re_detail::cpp_regex_traits_base<char>, std::__1::__value_type<boost::re_detail::cpp_regex_traits_base<char>, std::__1::__list_iterator<std::__1::pair<boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const>, boost::re_detail::cpp_regex_traits_base<char> const*>, void*> >, std::__1::less<boost::re_detail::cpp_regex_traits_base<char> >, true>, std::__1::allocator<std::__1::__value_type<boost::re_detail::cpp_regex_traits_base<char>, std::__1::__list_iterator<std::__1::pair<boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const>, boost::re_detail::cpp_regex_traits_base<char> const*>, void*> > > >::__erase_unique<boost::re_detail::cpp_regex_traits_base<char> >(boost::re_detail::cpp_regex_traits_base<char> const&) in libboost_regex.a(instances.o)
...
"std::__1::locale::operator=(std::__1::locale const&)", referenced from:
boost::re_detail::cpp_regex_traits_base<char>::imbue(std::__1::locale const&) in libboost_regex.a(instances.o)
boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const> boost::re_detail::create_cpp_regex_traits<char>(std::__1::locale const&) in libboost_regex.a(instances.o)
"std::__1::collate<char>::id", referenced from:
boost::re_detail::cpp_regex_traits_base<char>::imbue(std::__1::locale const&) in libboost_regex.a(instances.o)
boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char> const> boost::re_detail::create_cpp_regex_traits<char>(std::__1::locale const&) in libboost_regex.a(instances.o)
"std::__1::ios_base::init(void*)", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
"std::__1::ios_base::clear(unsigned int)", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
"std::__1::numpunct<char>::id", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
"std::__1::basic_ios<char, std::__1::char_traits<char> >::~basic_ios()", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
"typeinfo for std::__1::basic_streambuf<char, std::__1::char_traits<char> >", referenced from:
typeinfo for boost::re_detail::parser_buf<char, std::__1::char_traits<char> > in libboost_regex.a(instances.o)
"vtable for std::__1::basic_istream<char, std::__1::char_traits<char> >", referenced from:
boost::cpp_regex_traits<char>::toi(char const*&, char const*, int) const in libboost_regex.a(instances.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I suspect that you have more than one thing going on here; moving -lboost_regex should solve some of them.
I suspect that the main problem you have is that you've built part of your program (the boost libraries, probably) with libc++, and the rest with libstdc++.
Your build command explicitly says -stdlib=libstdc++, but the error message mentions std::__1::...., which is where things live in libc++.

HealPix linking with c++ code on OS X

I have successfully installed and tested HealPix 3.11 on my MacBookPro running OS X 10.9.2.
In the configure script I have chosen 'cxx' and 'osx'.
Now I'm trying to link to the HealPix libraries in a C++ program and get the following linking errors:
make
g++ -o./test.o -I/Users/kruip/Software/Bonn/plugins/Healpix_3.11/src/cxx/osx/include -c test.cpp
g++ test.o -o test -lm -L/Users/kruip/Software/Bonn/plugins/Healpix_3.11/src/cxx/osx/lib -lhealpix_cxx -lgslcblas -lgsl
Undefined symbols for architecture x86_64:
"equal_nocase(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:
string2HealpixScheme(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libhealpix_cxx.dylib(healpix_tables.o)
"planck_failure__(char const*, int, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
string2HealpixScheme(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libhealpix_cxx.dylib(healpix_tables.o)
"planck_failure__(char const*, int, char const*, char const*)", referenced from:
T_Healpix_Base<int>::query_multidisc_general(arr<vec3_t<double> > const&, arr<double> const&, bool, std::__1::vector<int, std::__1::allocator<int> > const&, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::Set(int, Healpix_Ordering_Scheme) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::query_strip_internal(double, double, bool, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
rangeset<int>::append(int const&, int const&) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::xyf2ring(int, int, int) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::loc2pix(double, double, double, bool) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::pix2loc(int, double&, double&, double&, bool&) const in libhealpix_cxx.dylib(healpix_base.o)
...
"find_enclosing_circle(arr<vec3_t<double> > const&, vec3_t<double>&, double&)", referenced from:
void T_Healpix_Base<int>::query_polygon_internal<int>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_polygon_internal<int>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_polygon_internal<long>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<long>&) const in libhealpix_cxx.dylib(healpix_base.o)
"trim(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
string2HealpixScheme(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libhealpix_cxx.dylib(healpix_tables.o)
"PlanckError::PlanckError(char const*)", referenced from:
T_Healpix_Base<int>::query_multidisc_general(arr<vec3_t<double> > const&, arr<double> const&, bool, std::__1::vector<int, std::__1::allocator<int> > const&, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::Set(int, Healpix_Ordering_Scheme) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::query_strip_internal(double, double, bool, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
rangeset<int>::append(int const&, int const&) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::xyf2ring(int, int, int) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::loc2pix(double, double, double, bool) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::pix2loc(int, double&, double&, double&, bool&) const in libhealpix_cxx.dylib(healpix_base.o)
...
"PlanckError::PlanckError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
string2HealpixScheme(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libhealpix_cxx.dylib(healpix_tables.o)
"PlanckError::~PlanckError()", referenced from:
T_Healpix_Base<int>::query_multidisc_general(arr<vec3_t<double> > const&, arr<double> const&, bool, std::__1::vector<int, std::__1::allocator<int> > const&, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::Set(int, Healpix_Ordering_Scheme) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::query_strip_internal(double, double, bool, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
rangeset<int>::append(int const&, int const&) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::xyf2ring(int, int, int) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::loc2pix(double, double, double, bool) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::pix2loc(int, double&, double&, double&, bool&) const in libhealpix_cxx.dylib(healpix_base.o)
...
"pointing::from_vec3(vec3_t<double> const&)", referenced from:
void T_Healpix_Base<long>::query_multidisc<long>(arr<vec3_t<double> > const&, arr<double> const&, int, rangeset<long>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_multidisc<int>(arr<vec3_t<double> > const&, arr<double> const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<int>::query_multidisc<int>(arr<vec3_t<double> > const&, arr<double> const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
"pointing::normalize()", referenced from:
void T_Healpix_Base<int>::query_disc_internal<int>(pointing, double, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_disc_internal<int>(pointing, double, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_disc_internal<long>(pointing, double, int, rangeset<long>&) const in libhealpix_cxx.dylib(healpix_base.o)
"pointing::to_vec3() const", referenced from:
void T_Healpix_Base<int>::query_disc_internal<int>(pointing, double, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_disc_internal<int>(pointing, double, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<int>::query_polygon_internal<int>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_polygon_internal<int>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_disc_internal<long>(pointing, double, int, rangeset<long>&) const in libhealpix_cxx.dylib(healpix_base.o)
void T_Healpix_Base<long>::query_polygon_internal<long>(std::__1::vector<pointing, std::__1::allocator<pointing> > const&, int, rangeset<long>&) const in libhealpix_cxx.dylib(healpix_base.o)
"typeinfo for PlanckError", referenced from:
T_Healpix_Base<int>::query_multidisc_general(arr<vec3_t<double> > const&, arr<double> const&, bool, std::__1::vector<int, std::__1::allocator<int> > const&, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::Set(int, Healpix_Ordering_Scheme) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::query_strip_internal(double, double, bool, rangeset<int>&) const in libhealpix_cxx.dylib(healpix_base.o)
rangeset<int>::append(int const&, int const&) in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::xyf2ring(int, int, int) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::loc2pix(double, double, double, bool) const in libhealpix_cxx.dylib(healpix_base.o)
T_Healpix_Base<int>::pix2loc(int, double&, double&, double&, bool&) const in libhealpix_cxx.dylib(healpix_base.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: *** [test] Error 1
This test code reproduces my problems:
#include "healpix_base.h"
int main(void){
Healpix_Base healpix_base_ref(5,RING);
return 0;
}
and my Makefile looks like this:
PLUGINS = /Users/kruip/Software/Bonn/plugins
HEALPIX_PATH = $(PLUGINS)/Healpix_3.11/src/cxx/osx
#COMP = /usr/local/bin/mpic++
COMP = g++
FLAGS =
MYLIBS = -L${HEALPIX_PATH}/lib -lhealpix_cxx
MYINCLUDE = -I${HEALPIX_PATH}/include
OBJS = test.o
all: test
test: ${OBJS}
${COMP} ${OBJS} -o test ${FLAGS} -lm $(MYLIBS) -lgslcblas -lgsl
test.o: test.cpp
${COMP} -o./test.o ${MYINCLUDE} -c test.cpp ${FLAGS}
clean:
rm -rf test.o test
Suggestions are very welcome at this point!
Fixed it by including the following linker invokations: -lhealpix_cxx -lcxxsupport -lsharp -lfftpack -lc_utils -lcfitsio

Boost Log 1.54 on Mac OS and QtCreator (G++)

How can one use logging library from Boost on version 1.54 ? (I'm using QtCreator and have successfully used boost/filesystem)
I read that the logging lib is now part of Boost, but I can't make it work on MacOs:
My .pro file:
#-------------------------------------------------
#
# Project created by QtCreator 2013-10-30T14:34:26
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Fottopic
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
configwindow.cpp \
windowmanager.cpp
HEADERS += mainwindow.h \
configwindow.h \
windowmanager.h
INCLUDEPATH += /usr/local/Cellar/boost/1.54.0/include
QMAKE_LIBDIR += /usr/local/Cellar/boost/1.54.0/lib
LIBS += -lboost_system\
-lboost_filesystem\
-lboost_log\
-lboost_log_setup
Output when building:
Undefined symbols for architecture x86_64:
"boost::log::v2s_mt_posix::sinks::text_file_backend::~text_file_backend()", referenced from:
boost::detail::sp_ms_deleter<boost::log::v2s_mt_posix::sinks::text_file_backend>::destroy() in main.o
"boost::log::v2s_mt_posix::sinks::text_file_backend::construct(boost::filesystem::path const&, std::_Ios_Openmode, unsigned long, boost::log::v2s_mt_posix::aux::light_function<bool ()()> const&, bool)", referenced from:
void boost::log::v2s_mt_posix::sinks::text_file_backend::construct<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> const&)in main.o
"boost::log::v2s_mt_posix::sinks::text_file_backend::flush()", referenced from:
void boost::log::v2s_mt_posix::sinks::basic_sink_frontend::flush_backend_impl<boost::mutex, boost::log::v2s_mt_posix::sinks::text_file_backend>(boost::mutex&, boost::log::v2s_mt_posix::sinks::text_file_backend&, mpl_::bool_<true>)in main.o
"boost::detail::get_tss_data(void const*)", referenced from:
boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::get() constin main.o
"boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool)", referenced from:
boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::reset(boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context*)in main.o
boost::thread_specific_ptr<boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::formatting_context>::~thread_specific_ptr()in main.o
"boost::log::v2s_mt_posix::sinks::text_file_backend::consume(boost::log::v2s_mt_posix::record_view const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::log::v2s_mt_posix::aux::fake_mutex, boost::log::v2s_mt_posix::sinks::text_file_backend>(boost::log::v2s_mt_posix::record_view const&, boost::log::v2s_mt_posix::aux::fake_mutex&, boost::log::v2s_mt_posix::sinks::text_file_backend&)in main.o
void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::mutex, boost::log::v2s_mt_posix::sinks::text_file_backend>(boost::log::v2s_mt_posix::record_view const&, boost::mutex&, boost::log::v2s_mt_posix::sinks::text_file_backend&)in main.o
"boost::log::v2s_mt_posix::aux::default_attribute_names::message()", referenced from:
boost::log::v2s_mt_posix::expressions::tag::message::get_name() in main.o
"boost::log::v2s_mt_posix::aux::code_convert(wchar_t const*, unsigned long, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::locale const&)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >& boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >::formatted_write<wchar_t>(wchar_t const*, long)in main.o
"boost::log::v2s_mt_posix::aux::once_block_sentry::enter_once_block() const", referenced from:
boost::log::v2s_mt_posix::aux::once_block_sentry::executed() constin main.o
"boost::log::v2s_mt_posix::aux::once_block_sentry::rollback()", referenced from:
boost::log::v2s_mt_posix::aux::once_block_sentry::~once_block_sentry()in main.o
"boost::log::v2s_mt_posix::aux::once_block_sentry::commit()", referenced from:
boost::array<std::pair<boost::log::v2s_mt_posix::type_info_wrapper, void*>, 2ul> const& boost::log::v2s_mt_posix::aux::type_sequence_dispatcher<boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >::get_dispatching_map<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&> >()in main.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::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&>) constin main.o
"boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2s_mt_posix::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&>) constin main.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::visitation_result boost::log::v2s_mt_posix::value_visitor_invoker<boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::log::v2s_mt_posix::fallback_to_none>::operator()<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&> >(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&, boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >&>) constin main.o
"boost::log::v2s_mt_posix::sinks::text_file_backend::set_file_collector(boost::shared_ptr<boost::log::v2s_mt_posix::sinks::file::collector> const&)", referenced from:
boost::shared_ptr<boost::log::v2s_mt_posix::sinks::synchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend> > boost::log::v2s_mt_posix::aux::add_file_log<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> const&)in main.o
"boost::log::v2s_mt_posix::sinks::text_file_backend::scan_for_files(boost::log::v2s_mt_posix::sinks::file::scan_method, bool)", referenced from:
boost::shared_ptr<boost::log::v2s_mt_posix::sinks::synchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend> > boost::log::v2s_mt_posix::aux::add_file_log<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> const&)in main.o
"boost::log::v2s_mt_posix::core::get()", referenced from:
boost::shared_ptr<boost::log::v2s_mt_posix::sinks::synchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend> > boost::log::v2s_mt_posix::aux::add_file_log<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> const&)in main.o
"boost::log::v2s_mt_posix::core::add_sink(boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> const&)", referenced from:
boost::shared_ptr<boost::log::v2s_mt_posix::sinks::synchronous_sink<boost::log::v2s_mt_posix::sinks::text_file_backend> > boost::log::v2s_mt_posix::aux::add_file_log<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::file_name, char const [11]> const&)in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [Fottopic.app/Contents/MacOS/Fottopic] Error 1
17:48:19: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Fottopic (kit: Desktop)
When executing step 'Make'

Lots of: 'Apple Mach-O Linker Errors'

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.