lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip 1.4.1 and win32: conflicts with 'in_addr', 'sockad


From: Markus Forrer
Subject: Re: [lwip-users] lwip 1.4.1 and win32: conflicts with 'in_addr', 'sockaddr_in', ...
Date: Tue, 27 May 2014 05:57:15 +0200

My problem was one include of windows.h in a header file of a simulation module.

Thanks an regards
Markus
 
 

Gesendet: Sonntag, 25. Mai 2014 um 23:09 Uhr
Von: "Gene Cumm" <address@hidden>
An: "Mailing list for lwIP users" <address@hidden>
Betreff: Re: [lwip-users] lwip 1.4.1 and win32: conflicts with 'in_addr', 
'sockaddr_in', ...
On May 25, 2014 4:54 PM, "Ueli Niederer" <address@hidden> wrote:
>
> Hi Markus
>
> I'm not sure what you are trying to achieve. From a distance I would say you 
> don't Need a lwIP on a Win32 platform as Win32 delivers an IP-Stack with more 
> or less Berkeley Sockets (WinSock2).
>
> If your simulation project has to share some of the PowerPC code I would 
> recommend to you to build an abstraction layer to program with. Although 
> Winsock supply a more or less Berkeley-like socket interface, there are still 
> some calls you have to invoke that do not fit.
>
> Regards
> Ueli
>
>
>
> Quoting address@hidden@gmx.ch]:
>
>
>
> I'm using lwip 1.4.1 in an embedded project (PowerPC) very successful.
>
> Now I'm trying to add lwip to the target simulation project (Win32
> Visual Studio 2013). The build fails with conflicts like:
>
> error C2011: 'in_addr' : 'struct' type redefinition
> lwip\src\include\ipv4\lwip\inet.h
> error C2011: 'sockaddr_in' : 'struct' type redefinition
> lwip\src\include\lwip\sockets.h
>   :
>   :
>
> This types are already defined in winsock.h
>
> How can I fix this problem? Thanks for any hints!
>
> Regards
> Markus
As implied, conditional pre-processor directives (i.e. #ifdef ) are common on 
multi-arch and multi-platform systems. These can get messy quickly. Grouping 
lines underneath a small number of conditionals often helps.
--Gene
_______________________________________________ lwip-users mailing list 
address@hidden 
https://lists.nongnu.org/mailman/listinfo/lwip-users[https://lists.nongnu.org/mailman/listinfo/lwip-users]



reply via email to

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