How do I compile and update libraries?

I am trying to fix the Charliplexing library for the LoL shield, since the current version gives stupid and ugly hot pixels. However, I can't seem to get anywhere because:

(1) When I alter the .cpp file for the library, and compile a binary that uses it, nothing happens to the .o file. How do I recompile a library from inside the Arduino environment?

(2) When I delete the .o file in the hope that this will force recompilation, and recompile a sketch that uses it, not only does the .o file not get rebuilt, but the sketch compiles fine EVEN THOUGH THE .o FILE IS MISSING, and gives the old (undesired) behavior. I am forced to conclude that an invisible copy of the old library is being held somewhere in the sketch. How do I purge that and get the new one to be used?

If it matters, I am running Arduino 0021 alpha under MacOS 10.5.8

Hi there,

What are you doing with the original .cpp? Did you make a copy of it? If so, you’ll probably find it’s also being compiled.

I had this same problem, so I renamed the file extension part of the file and it then worked as I expected.

I am editing the original .cpp file, so there are no other copies in existence. (If I need to revert, I'll unpack the library again.)

After I deleted the .o file, I did "Empty Trash" to be sure it was gone.

So, as far as I know, there is no source available except my new version, and no .o file at all. I don't understand how I can be getting the old behavior. I suppose it's remotely possible that my changes are having no effect; I can test for that by doing something that will be obviously visible.

You could always slap in a syntax error and see if it fails to compile, that way you'd know if it's compiling from the new source or not.

OK, it looks like the system is compiling the new source, but not producing a .o file.

The buggy behavior of the Charliplexing library can be shown by lighting just one LED. - If the lit LED is in row r=0 or column c=7, there is no problem. - else, if the lit LED is in column 9, 11, or 13, the LED in row 0 of that column is also weakly lit - else, the LED in column 7 of the same row is also weakly lit thus, LEDs 0,9 0,11 0,13 1,7 2,7 3,7 4,7 5,7 6,7 7,7 8,7 all may be somewhat lit when they should be completely off.

I found and fixed a bug where he processes 13 pairs of data even though his array is only 12 pairs long (last pair is off the end of the array), but that doesn't fix the problem.