Compiling Errors with Xively_DatatreamUpload
dlglaser opened this issue · 11 comments
I'm totally new to Xively, trying out your sample code. When I compile Xively_DatastreamUpload, I get this sequence of errors, all of which point to XivelyClient.cpp.
Thanks, in advance for your help!
Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp: In member function 'int XivelyClient::put(XivelyFeed&, const char*)':
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:12: error: 'HttpClient' was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:12: error: expected `;' before 'http'
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:15: error: 'http' was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp: In member function 'int XivelyClient::get(XivelyFeed&, const char*)':
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:74: error: 'HttpClient' was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:74: error: expected `;' before 'http'
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:77: error: 'http' was not declared in this scope
/Users/admin/Documents/Arduino/libraries/Xively/XivelyClient.cpp:165: error: 'delay' was not declared in this scope
You probably either forgot to import the HttpClient library, or you didn't install it in the Arduino Library folder.
#include <HttpClient.h>
Make sure you've downloaded and installed it first. The Xively library requires it.
Thank you for the quick reply. I did put HttpClient library in the library folder, but it does seem that I may be missing some library component, though I haven't been able to identify what. All of the Xively example sketches give me the same compiling errors.
Did you make sure to restart the Arduino IDE after adding the library? What OS are you using, what version of the IDE, and where exactly did you put the Xively folder? Does that library show up in File>Examples? If not, then the IDE can't see it.
Yes, I restarted the IDE. I have Mac OSX 10.6.8. Arduino IDE 1.0.5. I put the Xively folder in Documents > Arduino > Libraries and it does show up in File>Examples. HTTPClient also shows up with two examples (Pachube Push and PachubeWifly). I just tried going back to Arduino IDE 1.0.2, but that didn't help.
I just tried 1.0.3 with the newest download of HTTPClient and Xively and the Datastream Upload example compiles fine for me. What board are you compiling it for? Give it a shot with 1.0.3 compiling for the Uno.
I found a newer version of HTTPClient and was able to compile! Thank you very much for the help! Now hopefully I can get it working :)
Great! As a reference to other people who might have the same issue as you, you should post a link to the version of HTTPClient that you used. Was is different than the one linked in the README for this repo?
It was the link that you sent me. I don't remember where I got the older version. So, I have another question, though maybe it doesn't belong in this thread. I'm already using 23 Kb of my Arduino's memory and I have almost nothing in the actual program that I want to write for Xively. I'm worried that I will run out of memory when I try to do my project, particularly since I want to save my data to microSD card. Have others encountered this problem?
Not a question for this thread, since this is an issue tracker. The admin for this repo should mark this issue as solved. Feel free to email me (http://www.jeremyblum.com/contact) and I can try to help you with your memory concerns. This library is fairly large...
OK, am I the admin, or will someone else close it? Thanks again.
Not you, the admin for the repo should confirm that the issue is resolved, and close it.