I just upgraded to 1.8.5 IDE. When I compiled a sketch that compiled and ran on the previous version I get a warning and one error. The error is related the OneWire library location. I get the error shown below although the OneWire.cpp file is at the location specified in the error message. I have attached a screen shot showing the file path.
I am at a loss as to why the IDE can't find the file. Any thoughts as to what is happening and how to correct the issue would be most appreciated.
Thanks
Dan
C:\Users\rdbro\Desktop\GREENHOUSE_BUILD_V1F_03-30-2018\GREENHOUSE_BUILD_V1F_03-30-2018.ino: In function 'void loop()':
C:\Users\rdbro\Desktop\GREENHOUSE_BUILD_V1F_03-30-2018\GREENHOUSE_BUILD_V1F_03-30-2018.ino:410:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if (! pageNameIs("/"))
^
readlink C:\Users\rdbro\OneDrive\Documents\Arduino\libraries\OneWire-master\OneWire.cpp: The system cannot find the file specified.
Error compiling for board Arduino/Genuino Mega or Mega 2560.
That is what I thought until I checked both locations. The OneWire.cpp file also appears both on the Onedrive as shown in the attached screen shot and on C: local drive as shown in the other screen shot.
The problem is caused by using the Arduino IDE with files located under the OneDrive folder.
The easiest solution is to not use the Arduino IDE with any files in OneDrive.
In this case it looks like you have your sketchbook located under OneDrive. You can change the location of the sketchbook folder via the Arduino IDE's File > Preferences > Sketchbook Location. Change that setting to any convenient folder on your computer as long as it's not in the OneDrive. The Arduino IDE does not automatically copy the contents of the previous sketchbook folder to the new location so you will need to do this manually.
For more details on the problem, steps that are being taken to fix it, and possible workarounds that will allow you use the Arduino IDE with OneDrive, see: