-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asio link error: undefined reference to if_indextoname(unsigned int, char*) using esp32-2019r1-rc2 (IDFGH-1262) #3557
Comments
@tgill880 Thanks for reporting the issue, we will look into it. Thanks. |
Hi @tgill880 Thanks for reporting this issue. The problem is in ASIO port which does not correctly address ESP32 platform for all scenarios. As a workaround (before fixed in ESP-IDF) you could supply a dummy definition of
|
Thanks, our program now links and loads onto the ESP32. We are trying to port chops-net-ip. Our library runs on top of We suspect the I will post additional issues when we have more information. |
This enables linking this project with an esp-idf version before and after the fix of issue espressif/esp-idf#3557 Commit to fix this in esp-idf espressif/esp-idf@b7ef7fe This was reported in issue #14
Environment
Problem Description
C++17 network library demo that uses
asio
fails with link errorI am porting the demo programs from a C++17 header only network library, chops-net-ip, to the
ESP32
.chops-net-ip
builds on top ofasio
. A demo program that sets up an echo server will not build due to a link error.undefined reference to if_indextoname(unsigned int, char*)
This function is defined in
net/if.h
. Including that library does not fix the error.#include <net/if.h>
The demo program compiles and works correctly on Windows, macOS and Linux.
Expected Behavior
Program compiles, builds, uploads to the ESP32.
Actual Behavior
Link error.
Steps to reproduce
make flash
Code to reproduce this issue
[GIST](https://gist.github.com/tgill880/177236582fb1c80f7e3cdc039f5bd10c
The link error is triggered by line 135.
iof.start_io(HDR_SIZE, msg_hndlr, msg_frame);
Debug Logs
Other items if possible
The text was updated successfully, but these errors were encountered: