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
......
}
......
}