// Setup lwIP.
// Initialize lwIP and its interface layer.
// Once TCP stack has been initialized, set hw and IP parameters, initialize MACB too.
First, I found out that I don't have to call the init functions myself, since now in the lwip 1.3.1, all those are called by the tcpip_init() function. Note that "ConfigureInterfaceCallback" is an empty function (code in comments). If the line in blue is commented, my code build without problems. When I uncomment the line in blue above, I get those errors:
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp_in.o: In function `tcp_input':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp_in.c:378: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp_in.o: In function `tcp_process':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp_in.c:710: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_abandon':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:245: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_slowtmr':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:786: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_fasttmr':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:818: undefined reference to `lwip_tcp_event'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 4813 ms.
The thing is that my configuration is like this:
#define LWIP_EVENT_API 0
#define LWIP_CALLBACK_API 1
When I check in the IP stack, the code in tcp.h is correctly disabled (the part using LWIP_EVENT_API is correctly disabled while the #else is functionnal).
I'm I missing something? Is there other parameters related to "lwip_tcp_event" that needs to be checked? Also, my application is in C++, while the lwip is in C. I'm using "extern C" everytime I need to #include header files from the framework, but I mention it cause I really don't know where to look for at the moment.
Thanks,
DownyTif
PS: my second problem is related I think... when I uncomment another portion of my ethernet code, I get undefined references for "lwip_tcp_event" but also for all the "tcp_xxx" functions, ex. "tcp_recv"