I'm trying to include Boost in my Xcode project and it seems no matter what I do the project doesn't want to compile.
I get this error every time:
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 Logger.o
"boost::log::v2s_mt_posix::attribute_set::insert(boost::log::v2s_mt_posix::attribute_name, boost::log::v2s_mt_posix::attribute const&)", referenced from:
boost::log::v2s_mt_posix::sources::basic_logger<char, boost::log::v2s_mt_posix::sources::severity_logger<boost::log::v2s_mt_posix::trivial::severity_level>, boost::log::v2s_mt_posix::sources::single_thread_model>::add_attribute_unlocked(boost::log::v2s_mt_posix::attribute_name const&, boost::log::v2s_mt_posix::attribute const&) in Logger.o
(Along with a bunch of others totally 108 errors.)
I've tried a lot to fix this, and read pretty much every question on StackOverflow that is relevant to this.
I am linking it in "Link Binary With Items", I've got libboost_serialization.a
and libboost_system.a
there (only things in that list).
After installing Boost manually with the ./b2
command, I dragged both of those files into the sidebar. Therefore, the files are in the same directory as my .xcodeproj
.
Under Library Search Paths
, I have $(PROJECT_DIR)
, so it should be able to find them.
Am I compiling it with the wrong flags or something?