lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] problems compiling lwIP


From: franz keuner
Subject: [lwip-users] problems compiling lwIP
Date: Fri, 10 Dec 2004 17:00:26 +0100 (MET)

Hi,
thanks for your help. Now I`m using the lwIP version 1.0.0 as a base and the
only file I had to add was the ip.h file (head version - because of the bug
in the Tasking EDE).
With this minor modification my project can be compiled.

But I`m still having the problem that the linking process isn`t executed.

The message generated by the Tasking EDE is still:
total errors: 0, warnings: 2
Linking and locating to project.out
E 243: module inet.obj (INET_C): symbol '_htons': multiply defined
E 243: module inet.obj (INET_C): symbol '_ntohs': multiply defined
E 243: module inet.obj (INET_C): symbol '_htonl': multiply defined
E 243: module inet.obj (INET_C): symbol '_ntohl': multiply defined
total errors: 4, warnings: 0
wmk: *** action exited with value 1.

The only place in the entire source code of the project where these
definitions are made is in the inet.h file (listing
below,lwip\src\include\ipv4\lwip\inet.h)

I tried a few things by editing this file and the definitions but none of
them met with success.

Best regards,
Franz




 * This file is part of the lwIP TCP/IP stack.
 * 
 * Author: Adam Dunkels <address@hidden>
 *
 */
#ifndef __LWIP_INET_H__
#define __LWIP_INET_H__

#include "lwip/arch.h"

#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"

u16_t inet_chksum(void *dataptr, u16_t len);
u16_t inet_chksum_pbuf(struct pbuf *p);
u16_t inet_chksum_pseudo(struct pbuf *p,
       struct ip_addr *src, struct ip_addr *dest,
       u8_t proto, u16_t proto_len);

u32_t inet_addr(const char *cp);
int inet_aton(const char *cp, struct in_addr *addr);
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not
reentrant! */

#ifdef htons
#undef htons
#endif /* htons */
#ifdef htonl
#undef htonl
#endif /* htonl */
#ifdef ntohs
#undef ntohs
#endif /* ntohs */
#ifdef ntohl
#undef ntohl
#endif /* ntohl */

#if BYTE_ORDER == BIG_ENDIAN
#define htons(x) (x)
#define ntohs(x) (x)
#define htonl(x) (x)
#define ntohl(x) (x)
#else
#ifdef LWIP_PREFIX_BYTEORDER_FUNCS
/* workaround for naming collisions on some platforms */
#define htons lwip_htons
#define ntohs lwip_ntohs
#define htonl lwip_htonl
#define ntohl lwip_ntohl
#endif
u16_t htons(u16_t x);
u16_t ntohs(u16_t x);
u32_t htonl(u32_t x);
u32_t ntohl(u32_t x);
#endif

#endif /* __LWIP_INET_H__ */

-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++




reply via email to

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