[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] sockets lwipopts.h problem
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] sockets lwipopts.h problem |
Date: |
Sun, 27 Feb 2011 11:27:06 +0100 |
"Mullanix, Todd" <address@hidden> wrote:
> I turned off the LWIP_COMPAT_SOCKETS option and it built. I verified that a
> tcp echo example worked.
Great!
> The way all the lwip files are included into app is via a file that includes
> all the lwip source files. This file had a #include "sockets.h" via another
> header file. So it looks like this is the problem.
Yes, that was it.
> What is the "standard" way to add all the lwip files into a project? Manually
> list them all in the project or #include them in a source file and include
> that file in your project.
The standard way would be to add all lwIP files to a library which you can then
add to your guild system. For small projects, adding all lwIP files will be as
good.
However, including all files in one big C file might lead to the problems seen
here. In general, in C it might also conflict with multiple static variables
having the same name in different files, but I don't know if we have that in
lwIP.
Also, I think the way lwIP redefines the socket functions can lead to problems,
so we might consider changing it...
Simon