Related
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.
trying to use Boost.Log on OSX (via MacPorts)
/*
* Copyright Andrey Semashev 2007 - 2013.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
namespace logging = boost::log;
//[ example_tutorial_trivial_with_filtering
void init()
{
logging::core::get()->set_filter
(
logging::trivial::severity >= logging::trivial::info
);
}
int main(int, char*[])
{
init();
BOOST_LOG_TRIVIAL(trace) << "A trace severity message";
BOOST_LOG_TRIVIAL(debug) << "A debug severity message";
BOOST_LOG_TRIVIAL(info) << "An informational severity message";
BOOST_LOG_TRIVIAL(warning) << "A warning severity message";
BOOST_LOG_TRIVIAL(error) << "An error severity message";
BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message";
return 0;
}
//]
(code sample taken from http://www.boost.org/doc/libs/1_54_0_beta1/libs/log/example/doc/tutorial_trivial_flt.cpp)
but when compiling lot of unresolved externals errors are produced:
$ gcc -I/opt/local/include loggertest.cpp -o loggertest -L/opt/local/lib -lboost_log-mt
Undefined symbols for architecture x86_64:
"boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)", referenced from:
boost::log::v2s_mt_posix::record::reset() in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)", referenced from:
boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::auto_release::~auto_release() in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::unhandled_exception_count()", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)", referenced from:
init() in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::push_record_unlocked(boost::rv<boost::log::v2s_mt_posix::record>&) in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::get()", referenced from:
init() in loggertest-87632e.o
"boost::log::v2s_mt_posix::sources::aux::get_severity_level()", referenced from:
boost::log::v2s_mt_posix::sources::aux::severity_level<boost::log::v2s_mt_posix::trivial::severity_level>::set_value(boost::log::v2s_mt_posix::trivial::severity_level) in loggertest-87632e.o
"boost::log::v2s_mt_posix::trivial::logger::get()", referenced from:
_main in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"boost::log::v2s_mt_posix::core::get_logging_enabled() const", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::ios_base::getloc() const", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*, unsigned long)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(unsigned long, char)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::flush() in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::sentry::sentry(boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in loggertest-87632e.o
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::sentry::~sentry() in loggertest-87632e.o
"std::__1::ctype<char>::id", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::__1::locale::~locale()", referenced from:
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
"std::terminate()", referenced from:
___clang_call_terminate in loggertest-87632e.o
"vtable for __cxxabiv1::__class_type_info", referenced from:
typeinfo for boost::exception in loggertest-87632e.o
typeinfo for boost::log::v2s_mt_posix::type_info_wrapper::uninitialized in loggertest-87632e.o
typeinfo for boost::log::v2s_mt_posix::aux::visible_type<boost::log::v2s_mt_posix::trivial::severity_level> in loggertest-87632e.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"operator delete(void*)", referenced from:
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::light_function<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > const&, boost::disable_if_c<is_rv_or_same<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)> >::value, int>::type) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::clone_impl(void const*) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::destroy_impl(void*) in loggertest-87632e.o
"operator new(unsigned long)", referenced from:
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::light_function<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >(boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > const&, boost::disable_if_c<is_rv_or_same<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> >, boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)> >::value, int>::type) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::light_function<bool (boost::log::v2s_mt_posix::attribute_value_set const&)>::impl<boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::greater_equal, boost::proto::argsns_::list2<boost::log::v2s_mt_posix::expressions::attribute_actor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity, boost::phoenix::actor>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::log::v2s_mt_posix::trivial::severity_level>, 0l> > >, 2l> > >::clone_impl(void const*) in loggertest-87632e.o
"___cxa_begin_catch", referenced from:
___clang_call_terminate in loggertest-87632e.o
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___cxa_end_catch", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___cxa_rethrow", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-87632e.o
"___gxx_personality_v0", referenced from:
init() in loggertest-87632e.o
_main in loggertest-87632e.o
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write(char const*, long) in loggertest-87632e.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-87632e.o
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_severity_logger<boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >, boost::log::v2s_mt_posix::trivial::severity_level>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-87632e.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
other boost libraries (system, thread, filesystem) work well. is there something wrong with my linker flags? build system? installation?
Edit: I also tried using clang++ as suggested, but I get similar errors:
$ clang++ -I/opt/local/include loggertest.cpp -o loggertest -L/opt/local/lib -lboost_log-mt -lboost_log_setup-mt
Undefined symbols for architecture x86_64:
"boost::log::v2s_mt_posix::record_view::public_data::destroy(boost::log::v2s_mt_posix::record_view::public_data const*)", referenced from:
boost::log::v2s_mt_posix::record::reset() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_name::get_id_from_string(char const*)", referenced from:
boost::log::v2s_mt_posix::attribute_name::attribute_name(char const*) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::release_compound(boost::log::v2s_mt_posix::aux::stream_provider<char>::stream_compound*)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::auto_release::~auto_release() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::stream_provider<char>::allocate_compound(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::unhandled_exception_count()", referenced from:
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::~record_pump() in loggertest-0b0a3b.o
boost::log::v2s_mt_posix::aux::record_pump<boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level> >::record_pump(boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>&, boost::log::v2s_mt_posix::record&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2s_mt_posix::attribute_name const&)", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::set_filter(boost::log::v2s_mt_posix::filter const&)", referenced from:
init() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::open_record(boost::log::v2s_mt_posix::attribute_set const&)", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::push_record_move(boost::log::v2s_mt_posix::record&)", referenced from:
boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex> >::push_record_unlocked(boost::rv<boost::log::v2s_mt_posix::record>&) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::get()", referenced from:
init() in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::sources::aux::get_severity_level()", referenced from:
boost::log::v2s_mt_posix::sources::aux::severity_level<boost::log::v2s_mt_posix::trivial::severity_level>::set_value(boost::log::v2s_mt_posix::trivial::severity_level) in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::trivial::logger::get()", referenced from:
_main in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_value_set::end() const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::attribute_value_set::find(boost::log::v2s_mt_posix::attribute_name) const", referenced from:
boost::log::v2s_mt_posix::value_extractor<boost::log::v2s_mt_posix::trivial::severity_level, boost::log::v2s_mt_posix::fallback_to_none, boost::log::v2s_mt_posix::trivial::tag::severity>::operator()(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute_value_set const&) const in loggertest-0b0a3b.o
"boost::log::v2s_mt_posix::core::get_logging_enabled() const", referenced from:
boost::log::v2s_mt_posix::record boost::log::v2s_mt_posix::sources::basic_composite_logger<char, boost::log::v2s_mt_posix::sources::severity_logger_mt<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::multi_thread_model<boost::log::v2s_mt_posix::aux::light_rw_mutex>, boost::log::v2s_mt_posix::sources::features<boost::log::v2s_mt_posix::sources::severity<boost::log::v2s_mt_posix::trivial::severity_level>, void, void, void, void, void, void, void, void, void> >::open_record<boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> >(boost::parameter::aux::tagged_argument<boost::log::v2s_mt_posix::keywords::tag::severity, boost::log::v2s_mt_posix::trivial::severity_level const> const&) in loggertest-0b0a3b.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Edit: solved by compiling with -DBOOST_LOG_DYN_LINK as suggested by #neverpanic
You are experiencing a standard library mismatch. Boost from MacPorts (and all other libraries from MacPorts and on modern OS X since 10.9, I think) are built against clang's libc++, rather than gcc's libstdc++. If you attempt to mix both standard libraries, you'll run into this problem (which is a good thing, because if you wouldn't see this, you'd likely see hard to debug crashes at runtime).
You need to use clang++ instead of gcc to compile your code. Alternatively, you can use /usr/bin/g++, which is nowadays a symlink to clang.
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'
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.
So I have a .cpp file that uses OpenCV. I've been having some problems with linking the libraries but I think my Makefile is "better" now.
Makefile:
CC=g++
#CC=gcc
# compile flags
CFLAGS=-g -Wall
# OpenCV Related
prefix=/usr/local/opencv
OCVFLAGS=-I${prefix}/include/opencv -I${prefix}/include
OCVLIBS=-L${prefix}/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_flann -lopencv_objdetect -lopencv_calib3d
PROGRAM=extractDescriptorsToFile
OBJECTS=$(PROGRAM).o
program: $(OBJECTS)
$(CC) $(OBJECTS) -o $(PROGRAM) $(OCVLIBS) -arch i386
$(PROGRAM).o: $(PROGRAM).cpp
$(CC) -c $(CFLAGS) $(OCVFLAGS) $(PROGRAM).cpp
clean:
rm -f *o
rm -f $(PROGRAM)
rm -f *~
However, when I "make", the .o file is generated but I get this error:
ld: warning: ignoring file extractDescriptorsToFile.o, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make: *** [program] Error 1
This is a similar post " Precompiled headers and compiling universal objects on OSX " but I don't think its quite my problem?
Any help would be appreciated...?
I think this error is sometimes cause by not having a main() but my file does...
Removing "-arch i386" leaves me with:
Undefined symbols for architecture x86_64:
"cv::operator<<(cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
cv::operator<<(cv::FileStorage&, char const*)in extractDescriptorsToFile.o
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
_main in extractDescriptorsToFile.o
"cv::Ptr<CvFileStorage>::delete_obj()", referenced from:
cv::Ptr<CvFileStorage>::release() in extractDescriptorsToFile.o
"cv::fastFree(void*)", referenced from:
cv::Ptr<CvFileStorage>::release() in extractDescriptorsToFile.o
cv::Ptr<cv::FeatureDetector>::release() in extractDescriptorsToFile.o
cv::Ptr<cv::DescriptorExtractor>::release() in extractDescriptorsToFile.o
cv::Mat::~Mat() in extractDescriptorsToFile.o
"cv::fastMalloc(unsigned long)", referenced from:
cv::Ptr<cv::FeatureDetector>::Ptr(cv::FeatureDetector*)in extractDescriptorsToFile.o
"cv::Mat::deallocate()", referenced from:
cv::Mat::release() in extractDescriptorsToFile.o
"cv::Mat::copySize(cv::Mat const&)", referenced from:
cv::Mat::operator=(cv::Mat const&)in extractDescriptorsToFile.o
"cv::Exception::Exception(int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from:
cv::FileStorage& cv::operator<< <cv::Mat>(cv::FileStorage&, cv::Mat const&)in extractDescriptorsToFile.o
"cv::error(cv::Exception const&)", referenced from:
cv::FileStorage& cv::operator<< <cv::Mat>(cv::FileStorage&, cv::Mat const&)in extractDescriptorsToFile.o
"cv::Exception::~Exception()", referenced from:
cv::FileStorage& cv::operator<< <cv::Mat>(cv::FileStorage&, cv::Mat const&)in extractDescriptorsToFile.o
"cv::write(cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&)", referenced from:
cv::FileStorage& cv::operator<< <cv::Mat>(cv::FileStorage&, cv::Mat const&)in extractDescriptorsToFile.o
"cv::_OutputArray::_OutputArray(cv::Mat&)", referenced from:
resizeImage(cv::Mat const&, int)in extractDescriptorsToFile.o
"cv::_InputArray::_InputArray(cv::Mat const&)", referenced from:
resizeImage(cv::Mat const&, int)in extractDescriptorsToFile.o
"cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)", referenced from:
resizeImage(cv::Mat const&, int)in extractDescriptorsToFile.o
"cv::OrbFeatureDetector::OrbFeatureDetector(unsigned long, cv::ORB::CommonParams)", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::FeatureDetector::create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::DescriptorExtractor::create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::FeatureDetector::detect(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat const&) const", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::write(cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&)", referenced from:
extract(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, char**, cv::FileStorage&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in extractDescriptorsToFile.o
"cv::FileStorage::FileStorage()", referenced from:
_main in extractDescriptorsToFile.o
"cv::FileStorage::FileStorage(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
_main in extractDescriptorsToFile.o
"cv::FileStorage::~FileStorage()", referenced from:
_main in extractDescriptorsToFile.o
"cv::FileStorage::isOpened() const", referenced from:
_main in extractDescriptorsToFile.o
"cv::FileStorage::release()", referenced from:
_main in extractDescriptorsToFile.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [program] Error 1
This is what I get when I add -arch i386 to both program and $(PROGRAM).o:
Undefined symbols for architecture i386:
"_gzputs", referenced from:
icvPuts(CvFileStorage*, char const*)in libopencv_core.a(persistence.o)
"_gzgets", referenced from:
icvGets(CvFileStorage*, char*, int)in libopencv_core.a(persistence.o)
"_gzeof", referenced from:
icvEof(CvFileStorage*) in libopencv_core.a(persistence.o)
"_gzclose", referenced from:
_cvReleaseFileStorage in libopencv_core.a(persistence.o)
_cvOpenFileStorage in libopencv_core.a(persistence.o)
"_gzopen", referenced from:
_cvOpenFileStorage in libopencv_core.a(persistence.o)
"_gzrewind", referenced from:
_cvOpenFileStorage in libopencv_core.a(persistence.o)
"cv::Mat::convertTo(cv::Mat&, int, double, double) const", referenced from:
cv::imencode(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(loadsave.o)
cv::imwrite_(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&, std::vector<int, std::allocator<int> > const&, bool)in libopencv_highgui.a(loadsave.o)
"cv::flip(cv::Mat const&, cv::Mat&, int)", referenced from:
_cvEncodeImage in libopencv_highgui.a(loadsave.o)
cv::imwrite_(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Mat const&, std::vector<int, std::allocator<int> > const&, bool)in libopencv_highgui.a(loadsave.o)
"_jpeg_destroy_decompress", referenced from:
cv::JpegDecoder::close() in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::~JpegDecoder()in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::~JpegDecoder()in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::~JpegDecoder()in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_CreateCompress", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_std_error", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_destroy_compress", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_set_defaults", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_set_quality", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_start_compress", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_write_scanlines", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_finish_compress", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_stdio_dest", referenced from:
cv::JpegEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_start_decompress", referenced from:
cv::JpegDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_read_scanlines", referenced from:
cv::JpegDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_finish_decompress", referenced from:
cv::JpegDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_alloc_huff_table", referenced from:
cv::JpegDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_CreateDecompress", referenced from:
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_read_header", referenced from:
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_stdio_src", referenced from:
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
"_jpeg_resync_to_restart", referenced from:
cv::jpeg_buffer_src(jpeg_decompress_struct*, cv::JpegSource*) in libopencv_highgui.a(grfmt_jpeg.o)
cv::JpegDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg.o)
"_jas_init", referenced from:
__static_initialization_and_destruction_0(int, int)in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_cleanup", referenced from:
___tcf_0 in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_matrix_create", referenced from:
cv::Jpeg2KEncoder::writeComponent16u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KEncoder::writeComponent8u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_writecmpt", referenced from:
cv::Jpeg2KEncoder::writeComponent16u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KEncoder::writeComponent8u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_matrix_destroy", referenced from:
cv::Jpeg2KEncoder::writeComponent16u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KEncoder::writeComponent8u(void*, cv::Mat const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_stream_close", referenced from:
cv::Jpeg2KDecoder::close() in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_destroy", referenced from:
cv::Jpeg2KDecoder::close() in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_create", referenced from:
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_stream_fopen", referenced from:
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
cv::Jpeg2KDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_strtofmt", referenced from:
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_encode", referenced from:
cv::Jpeg2KEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_getcmptbytype", referenced from:
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_cmprof_createfromclrspc", referenced from:
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_chclrspc", referenced from:
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_cmprof_destroy", referenced from:
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_readcmpt", referenced from:
cv::Jpeg2KDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_jpeg2000.o)
"_jas_image_decode", referenced from:
cv::Jpeg2KDecoder::readHeader() in libopencv_highgui.a(grfmt_jpeg2000.o)
"_png_destroy_read_struct", referenced from:
cv::PngDecoder::close() in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::~PngDecoder()in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::~PngDecoder()in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::~PngDecoder()in libopencv_highgui.a(grfmt_png.o)
"_png_create_write_struct", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_create_info_struct", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_destroy_write_struct", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_write_fn", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_filter", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_compression_level", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_compression_strategy", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_IHDR", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_write_info", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_bgr", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_write_image", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_write_end", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_set_compression_mem_level", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
"_png_init_io", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_set_swap", referenced from:
cv::PngEncoder::write(cv::Mat const&, std::vector<int, std::allocator<int> > const&)in libopencv_highgui.a(grfmt_png.o)
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_strip_alpha", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_read_update_info", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_read_image", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_read_end", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_rgb_to_gray", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_gray_to_rgb", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_expand_gray_1_2_4_to_8", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_palette_to_rgb", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_set_strip_16", referenced from:
cv::PngDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_png.o)
"_png_create_read_struct", referenced from:
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_set_read_fn", referenced from:
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_read_info", referenced from:
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_get_IHDR", referenced from:
cv::PngDecoder::readHeader() in libopencv_highgui.a(grfmt_png.o)
"_png_error", referenced from:
cv::PngDecoder::readDataFromBuf(void*, unsigned char*, unsigned long)in libopencv_highgui.a(grfmt_png.o)
"_TIFFClose", referenced from:
cv::TiffDecoder::close() in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::readHeader() in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::~TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::~TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::~TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFIsTiled", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFGetField", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::readHeader() in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFReadEncodedStrip", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFReadRGBAStrip", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFReadEncodedTile", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFReadRGBATile", referenced from:
cv::TiffDecoder::readData(cv::Mat&) in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFOpen", referenced from:
cv::TiffDecoder::readHeader() in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFRGBAImageOK", referenced from:
cv::TiffDecoder::readHeader() in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFSetErrorHandler", referenced from:
cv::TiffDecoder::TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
"_TIFFSetWarningHandler", referenced from:
cv::TiffDecoder::TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
cv::TiffDecoder::TiffDecoder()in libopencv_highgui.a(grfmt_tiff.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make: *** [program] Error 1
What happens if you remove explicit architecture specification (" -arch i386 ") from line 19? I guess that might help.
EDIT
Well it seems to me that you have a 64-bit OS, and 32-bit OpenCV libraries.