lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] dereferencing pointer to incomplete type in static LwIP


From: address@hidden
Subject: Re: [lwip-users] dereferencing pointer to incomplete type in static LwIP library
Date: Tue, 27 Mar 2012 19:45:58 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120313 Thunderbird/11.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]