Go Down

Topic: Installation of WString library (Read 885 times) previous topic - next topic

ardudillo

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?

Coding Badly

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

Erthy Dyrssen

#2
Nov 06, 2009, 11:16 pm Last Edit: Nov 06, 2009, 11:21 pm by Erthy_Dyrssen Reason: 1
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

Coding Badly

Quote
Unzipping the downloaded file there worked fine for me

Libraries work when you put them in the Sketch Directory / Application Folder?

Erthy Dyrssen

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 ;) and works correctly (in both locations).

ardudillo

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.

Go Up