when using remote_endpoint().address() of asio, make failed( undefined reference to `if_indextoname(unsigned int, char*)
Posted: Thu Feb 21, 2019 6:27 am
Hi guys,
I'm writing a tcp server in the ESP32, everything work fine, but when I add the following code to my program, it will make failed, and tell me
this is the code will cause the link error:
any tips? Thank you!
I'm writing a tcp server in the ESP32, everything work fine, but when I add the following code to my program, it will make failed, and tell me
.undefined reference to `if_indextoname(unsigned int, char*)
this is the code will cause the link error:
Code: Select all
this->acceptor->async_accept([this](std::error_code ec, tcp::socket socket) {
if (!ec) {
socket.remote_endpoint().address().to_string().c_str(); // this code will cause link error
......
}
......
}