Importing Libraries

I got an lol shield and am trying to program it. All of the programs require charlieplexing but when i try to import it it just says that an error has occurred.

Try including it, instead. Java imports libraries. C++ doesn't.

If necessary, download the library the old-fashioned way.

but when i try to import it it just says that an error has occurred.

Please define 'import it'. Is that when you use the library manager or when you use it in your code?

If the problem is the former, please give the steps that you took to 'import' the libraries. For 3rd party libraries, they need to be placed in the directory C:\Users\yourusername\Documents\Arduino\libraries (on a windows system).

I usually just download a required library, unzip it and place it manually in a subdirectory with the correct name in that directory.

If your code does not compile after using a #include <requiredlibrary.h>, I'm sure it says far more than that. Place your cursor in the output window, select and copy all orange text and paste it here.

Also provide your code.

Code and error messages should be posted using code tags
Type
** **[code]** **

Paste code or error message after that
Type
** **[/code]** **
after that

So it looks like

code or error messages

PS please provide a link to the charlieplexing library

i used a downloaded library on my computer and in the IDE i went to Libraries> Custom> Import. i downloaded it from Arduino Playground - Charlieplex Library

I asked for the error message :wink:

Anyway, I got the library and placed it in the location that I mentioned, included the file in an empty sketch and got the below error (IDE 1.6.6)

In file included from C:\Users\sterretje\AppData\Local\Temp\arduino_591cfee1a66acc0f1249aa0e9ea04a00\sketch_feb28a.ino:2:0:

C:\Users\sterretje\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:11:22: fatal error: WProgram.h: No such file or directory

 #include <WProgram.h>

                      ^

compilation terminated.

Using library Charlieplex in folder: C:\Users\sterretje\Documents\Arduino\libraries\Charlieplex (legacy)
exit status 1
Error compiling.

If that is the error that you get, you can fix this by finding the Charlieplex.h file in the directory where you installed it and fixing it using e.g. notepad. Find the below line in the file

#include <WProgram.h>

And replace it with

#include <Arduino.h>

Save and you should be good to go.

Reason for the error: the library is old and not updated for use with newer IDEs.

Reason for the error: the library is old and not updated for use with newer IDEs.

Version 1.0 is hardly a "newer IDE".