This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invalid conversion from void* to void**


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]