Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 6 months ago.
Pico - getting undefined reference error
Hi all,
I'm working on a project where I'm using the PicoTCP library to create a DHCP server (I use a somewhat older version of this library: https://developer.mbed.org/users/daniele/code/PicoTCP/). In my main.cpp, I have the following code:
main.cpp
... #include "pico_dhcp_server.h" ... int main(void) { ... // create DHCP server struct pico_dhcpd_settings s = { }; s.my_ip.addr = long_be(0x0a280001); /* 10.40.0.1 */ pico_dhcp_server_initiate(&s); }
The pico_dhcp_server_initiate function is defined in pico_dhcp_server.h as follows:
pico_dhcp_server.h
int pico_dhcp_server_initiate(struct pico_dhcpd_settings *setting);
When compiling, I get the following error: "undefined reference to pico_dhcp_server_initiate(pico_dhcpd_settings *)". I'm not really sure why this is the case. I can use other constructs from the pico library without problems.
Can someone help me with this error and sees what I do wrong?