On Tue, Mar 27, 2012 at 1:45 PM,
address@hidden <address@hidden> wrote:
Martin Osterloh wrote:
I am new to LwIP and just started to play around with it. I wrote a makefile to put LwIP into a static library. Compiling is no problem. My sys_arch is not 100% complete yet (I still have to map mailboxes).
However, I wrote a sample program to test LwIP. I can call sys_init() or lwip_init() without problems.
If I try to do:
struct tcp_pcb *pcb;
pcb->remote_port = 1024;
for example, I get dereferencing errors.
What exactly do you mean by "dereferencing errors"?
It seems that my program does not know anything about LwIP internals (but I can call lwip_init() etc).
I'm confused. Which files did you include in lwip_test.c to use struct tcp_pcb?
I use
gcc lwip_test.c -o lwip_test -llwip
to compile. The liblwip.a is in the same directory as the lwip_test.c.
The lib file does not tell the compiler what "struct tcp_pcb" is, you have to include "lwip/tcp.h" for that. I get the impression this is a problem in understanding the C language, not lwIP??
Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users