5 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:


#include "pico_dhcp_server.h"

int main(void) {
    // create DHCP server
    struct pico_dhcpd_settings s = { };
    s.my_ip.addr = long_be(0x0a280001); /* */

The pico_dhcp_server_initiate function is defined in pico_dhcp_server.h as follows:


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?

Be the first to answer this question.