6 years, 8 months ago.

EthernetNetIf does not work with later revisions of mbed


When I updated the mbed library to the latest revision (#78), I am getting the following L6218E errors from a code that used to compile OK.

Error: Undefined symbol mbed::Base::Base() (referred from fwk-if-eth-EthernetNetIf.cpp.o). Error: Undefined symbol mbed::Timer::Timer(const char*) (referred from fwk-if-eth-EthernetNetIf.cpp.o).

I tried updating EtherNetIf to the latest revison without avail. However, the code compiles if I switched mbed to revision #40 (failed for 50). But I need the later revision for my other functions. What should I do? I am new to C and mbed.

Thanks, T.H.

2 Answers

6 years, 8 months ago.

EthernetIf is outdated, it has been replaced long ago by https://mbed.org/handbook/Ethernet-Interface. You can search on the site for more examples if needed, this can also help, a list of public programs using the Ethernet-Interface library: https://mbed.org/users/mbed_official/code/EthernetInterface/dependents.

Since EthernetIf is outdated, it doesn't work anymore with later versions of the mbed lib.

Hi Erik: I followed your instructions and was able to get the two "featured" HelloWorld programs compiled. I also have to update the mbed and EthernetInterface libraries as you stated. It is all good now. Thank you! T.H.

posted by T.H. Lu 20 Feb 2014
T.H. Lu
6 years, 8 months ago.

Hi Erik:

Thanks a lot for your prompt response and valuable feedback.

I tried importing the two featured programs under EthernetInterface: NTPClient_HelloWorld and HTTPClient_HelloWorld. Unfortunately, both failed due to missing repositories: mbed-rtos/rtos and mbed-rtos/rtx.

I finally found another program named HTTPClient_HelloWorld by ban4jp that worked. I will use it as reference. I am surprised to learn that Featured code on mbed's website would fail to compile...

Thanks again for your help! TH


I have seen that happen before, no idea why it happens, I guess the mbed-rtos has been moved to a new location, normally it shouldn't happen. Anyway what you can do is then remove the mbed-rtos folder (which is empty), and import the most current one: http://mbed.org/users/mbed_official/code/mbed-rtos/. Then I found out in that program the other libs are also outdated (that is supposed to be the case, since they shouldn't be automatically updated), which causes it not to compile (which shouldn't happen). I updated all libs (click on them, at the right side there is update button), and then the NTPClient one compiled fine.

Regarding featured, a bit ago I found out it is just a setting everyone can enable for his/her own libraries, it isn't done by mbed staff.

posted by Erik - 20 Feb 2014