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: Martin Osterloh
Subject: Re: [lwip-users] dereferencing pointer to incomplete type in static LwIP library
Date: Tue, 27 Mar 2012 14:01:13 -0400

I see, indeed a misunderstanding. I thought I could put lwip into a library and then just call it as needed without having the hassle of including headers. 

Now, how should I organize my project in order to compile a small test program that is essentially able to create a socket? Can I still use my static library? 

Thanks again for your help!

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


reply via email to

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