Код: Выделить всё
Undefined symbols for architecture x86_64:
"boost::system::detail::system_category_instance", referenced from:
_main in main.cpp.o
boost::asio::io_context::io_context() in main.cpp.o
boost::asio::detail::scheduler::scheduler(boost::asio::execution_context&, int) in main.cpp.o
boost::asio::detail::scheduler::~scheduler() in main.cpp.o
boost::asio::detail::scheduler::~scheduler() in main.cpp.o
boost::asio::detail::scheduler::shutdown() in main.cpp.o
boost::asio::local::basic_endpoint::basic_endpoint(std::__1::basic_string const&) in main.cpp.o
...
"boost::system::detail::generic_category_instance", referenced from:
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in main.cpp.o
boost::system::error_category::std_category::equivalent(std::__1::error_code const&, int) const in main.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in module_loader.cpp.o
boost::system::error_category::std_category::equivalent(std::__1::error_code const&, int) const in module_loader.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in native_module_config.cpp.o
boost::system::error_category::std_category::equivalent(std::__1::error_code const&, int) const in native_module_config.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in native_module_context.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Обновление: эта ошибка возникает только тогда, когда я меняю стандарт C++ (на любой другой, кроме 11) в мой файл cmake. До сих пор не понимаю, как решить эту проблему.
Как устранить эту ошибку
Подробнее здесь: https://stackoverflow.com/questions/785 ... -the-error