Dealing with changes to library files

Hi I am not a newbie exactly but have not been using Arduino for very long. I really like it and the cost is hard to beat! One issue that came up lately is modifying library files. In this case it is an add-on library OneWireSlave. This library includes OneWireSlave.h and OneWireSlave.cpp .I came across some modified files at GitHub and needed to add them to the library. So I just copied them to the library and overwrote the existing files. For some reason I could not get the sketch of interest to compile successfully. I suspected some issue with the .h file from the compile errors but no amount of downloading and copying would change anything. I deleted the library but Arduino said the library still existed. The compiler still said it was getting the .cpp and .h from the library that I deleted How so??? I began searching for the two library files and found that they existed in the temp folder where arduino does the compile. Tell me if I am wrong but it seemed that these files were being used instead of the files from the non existent folder. Now I'm really scratching my head. I also read something about .o files that are produced and used each time a compile is done. So after deleting the .h, .cpp and .o files in the temp folder I did a verify and got the error "file does not exist". Good, just what I expected all along. I put the .h and .cpp files in my project folder and referenced them directly in the sketch and it compiled perfectly. What is going on with the library and how it is used and modified??? Please help me understand.

Thanks

Please help me understand.

Please help me understand what operating system you are using. Please help me understand what version of the IDE you are using.

Windows 7 64bit Arduino 1.0.5 r2

Same ones I use, and I never have this problem. Close the IDE. Blow away everything in C:\Users<your user id>\AppData\Local\Temp. Then, see if you can reproduce the problem.

That's what I did to fix the issue. I want to know if 1.0.5 r2 is designed to keep the library files from the first compile and changing a library file will not result in the file being recompiled until forced to by clearing out the temp folder. Hope that makes sense. Richard

I want to know if 1.0.5 r2 is designed to keep the library files from the first compile

No, it isn't. I've never encountered the problem you did (except that Win7 is about the flakiest OS I've ever used (except Vista)).

OK thanks. I’ll see if I can recreate the issue.

I want to know if 1.0.5 r2 is designed to keep the library files from the first compile and changing a library file will not result in the file being recompiled until forced to by clearing out the temp folder. Hope that makes sense. Richard

No, as long as the IDE has been restarted since the library was installed then its fine. Modifying library files after the IDE has been loaded is fine, the changes will be seen.

This is similar to an error I've had. I compiled a test sketch for Due, then switched the board type to an AVR model. I got an error because it tried to compile Due source files that were left in the temp dir.

Hi PYro Well I was switching between board types, mega2560 and Teensy 3.1. Maybe that was what happened. I know I was really stumped for a while. I'll keep that in mind. Regards