This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: invalid conversion from void* to void**
- From: Andrew Lunn <andrew at lunn dot ch>
- To: robert sebestyen <sebestyenrobert at hotmail dot com>
- Cc: andrew at lunn dot ch, ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 4 May 2006 15:16:18 +0200
- Subject: Re: [ECOS] invalid conversion from void* to void**
- References: <20060504124025.GE3797@lunn.ch> <BAY19-F3C8F8EC441D6D70DD26C8B7B40@phx.gbl>
On Thu, May 04, 2006 at 03:02:08PM +0200, robert sebestyen wrote:
> Hi Andrew, you are right it is netbuf_data , occuring that problem,
> I tried already the way netbuf_data(buf,(void**)&data,&len);
> I got doing that the linkermessages
> undefined references to ntohl, netconn_new, and sys_thread_new;
> it is somehow crazy cause the objectfiles are existing but he does not
> found the references
>
> obj/maintask.o(.text+0x1f4): In function `httpget':
> src/maintask.cxx:281: undefined reference to `netconn_new(netconn_type)'
> obj/maintask.o(.text+0x228):src/maintask.cxx:287: undefined reference to
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x250):src/maintask.cxx:287: undefined reference to
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x278):src/maintask.cxx:287: undefined reference to
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x2a0):src/maintask.cxx:287: undefined reference to
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x3ec): In function `ppp_modem()':
> src/maintask.cxx:374: undefined reference to `ntohl(unsigned long)'
> obj/maintask.o(.text+0x414):src/maintask.cxx:374: more undefined references
> to `ntohl(unsigned long)' follow
> obj/maintask.o(.text+0x4a4): In function `ppp_modem()':
> src/maintask.cxx:380: undefined reference to `sys_thread_new(void
> (*)(void*), void*, int)'
> collect2: ld returned 1 exit status
> make: *** [sirf_demo.out] Error 1
> make: Target `all' not remade because of errors.
This looks like a header file problem:
include/lwip/inet.h:
#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
Note you are only getting linker errors in your code. The lwip code
itself is happy.
I guess you have not included the correct header file(s).
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss