Compile failure WebClient.pde:undefined ref to webclient_get

Postings related to the second version of the WiShield

Compile failure WebClient.pde:undefined ref to webclient_get

Postby bethesda » Thu Nov 04, 2010 5:52 pm

Can't compile this file:

https://github.com/asynclabs/WiShield/b ... Client.pde

Someone else posted the same error, and someone suggested un-commenting a line in apps-conf.h, to look like this:

#define APP_WEBCLIENT

This did not work for me. Can someone explain what causes this error?

Thanks!

WebClient.cpp.o: In function `loop':
WebClient.cpp:72: undefined reference to `webclient_get'
WiShield/uip.c.o: In function `uip_process':
/Users/david/Documents/Arduino/libraries/WiShield/uip.c:776: undefined reference to `webclient_appcall'
/Users/david/Documents/Arduino/libraries/WiShield/uip.c:815: undefined reference to `webclient_appcall'
/Users/david/Documents/Arduino/libraries/WiShield/uip.c:1570: undefined reference to `webclient_appcall'
/Users/david/Documents/Arduino/libraries/WiShield/uip.c:1597: undefined reference to `webclient_appcall'
/Users/david/Documents/Arduino/libraries/WiShield/uip.c:1674: undefined reference to `webclient_appcall'
WiShield/uip.c.o:/Users/david/Documents/Arduino/libraries/WiShield/uip.c:1755: more undefined references to `webclient_appcall' follow
WiShield/stack.c.o: In function `stack_init':
/Users/david/Documents/Arduino/libraries/WiShield/stack.c:81: undefined reference to `webclient_init'
bethesda
 
Posts: 6
Joined: Thu Nov 04, 2010 5:43 pm

Re: Compile failure WebClient.pde:undefined ref to webclient_get

Postby gordonendersby » Fri Nov 05, 2010 4:00 am

Not sure if its relevant but what os are you using?
Have you successfully compiled any of the other wishield examples?
What does the rest of the define section look like in apps-conf.h?
Post a copy up here, enclosed in the code tags, for us to see. You may have a typo or not commented out another line.

I assume you are compiling this from the examples in the WiShield library and you have both WebClient.pde and webclient.c in the WebClient example directory?

Gordon
gordonendersby
 
Posts: 40
Joined: Tue May 12, 2009 7:43 am

Re: Compile failure WebClient.pde:undefined ref to webclient_get

Postby bethesda » Fri Nov 05, 2010 4:47 am

Gordon, thanks very much, I was missing the webclient.c file. I haven't done C in 20 years and it shows.

David
bethesda
 
Posts: 6
Joined: Thu Nov 04, 2010 5:43 pm

Re: Compile failure WebClient.pde:undefined ref to webclient_get

Postby bethesda » Fri Nov 05, 2010 5:22 am

Actually, now I have another question. What fundamentally is the difference between SimpleClient.pde and WebClient.pde? SimpleClient can do an HTTP GET, which is what I want, and it doesn't appear to require a large c file...I don't understand why WebClient which does a POST requires the extra C file?

Thanks.
bethesda
 
Posts: 6
Joined: Thu Nov 04, 2010 5:43 pm

Re: Compile failure WebClient.pde:undefined ref to webclient_get

Postby gordonendersby » Fri Nov 05, 2010 7:42 am

SimpleClient uses the extra functions available from wiserver, an extension to the standard libraries.
Its an extra layer of abstraction on top of the standard library and you are working with C++.
Also I believe you can use both server and client tasks through wiserver in the same sketch.
Its not directly supported by Asnc labs.

Whereas webclient uses the Async labs standard library so you have to use the lower level functions in the accompanying C file. Anything you do there is in C rather than C++.

There is also a user contributed branch of the WiShield library on github with enhancements made by a number of people with very big brains working on udp, socket applications, dns loockup, dhcp and better recovery from broken connections.

Its all amazing stuff and a lot of work has been put in by forum members.
Lots to get your head round.

Gordon
gordonendersby
 
Posts: 40
Joined: Tue May 12, 2009 7:43 am


Return to WiShield 2.0

Who is online

Users browsing this forum: No registered users and 1 guest