Pages: [1]   Go Down
Author Topic: Installation of WString library  (Read 822 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, this is probably a really boneheaded question but I can't seem to get the WString library to work.

Following the instructions on:

http://www.arduino.cc/en/Tutorial/TextString

I donwloaded the zip file String.zip and ran immediately into trouble. The instructions say:

"To use, unzip it and copy the resulting folder, called String, into the lib/targets/libraries directory of your arduino application folder."

Well, my arduino application folder has no "targets" directory in it. (Version 0017 for Linux). Still, no probs, I fearlessly went and created a "targets" and a "libraries" inside it. I then dumped the contents of the String.zip file in there (the folder called "String").

I then went and killed and restarted my IDE, went to File -> Examples to find the new examples, no joy.

OK, no sweat. I went into arduino/lib/targets/libraries/String/examples/StringAppendCharacter, opened the example and copy pasted it into the IDE. Trying to compile it informed me that:

66: error: WString.h: No such file or directory In function 'void setup()':
 In function 'void loop()':

Sooo, I repeatedly tried restarting my IDE, I zapped my X server for the hell of it, nothing. The IDE stubbornly refuses to acknowledge the library. Any ideas what I 'm doing wrong?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12911
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I cannot say for certain what it is for Linux but for Windows the library directory should be...

 hardware\libraries

So, on my computer, the directory for String is...

 C:\Arduino\arduino-0015\hardware\libraries\String
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should use the "Arduino application folder".
In windows, this means:
C:\Users\<username>\Documents\Arduino
that is the same folder where the users sketcht are saved.
Unzipping the downloaded file there worked fine for me.

and yes, another good place is in subdirectory
hardware\libraries
starting from the dir that contains arduino.exe
« Last Edit: November 06, 2009, 05:21:21 pm by Erthy_Dyrssen » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12911
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Unzipping the downloaded file there worked fine for me
Libraries work when you put them in the Sketch Directory / Application Folder?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes Coding Badly.
They are listed in the File->Examples menus as divided from the libraries that you put in \arduino-00xx\hardware\libraries\

I tryed smiley-wink and works correctly (in both locations).
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys. .../hardware/libraries/ worked for me as well. But I can't help but wonder why the instructions quote lib/targets/libraries. I also saw the same instructions while browsing some other library, can't remember where now. Maybe lib/targets/libraries is a folder used in older versions that the new IDE overlooks? Still, it would make sense to have a separate folder for libs which are not hardware related.
Logged

Pages: [1]   Go Up
Jump to: