I have a rather complex sketch running on a Mega 2560. It works fine on both V1.5.1r2 and V1.0.3. On the former IDE, it compiles when selecting the Mega 2560 board but fails when selecting the Due programming port. The error statement is as follows.
C:\Users\xxxxx\Documents\Arduino\libraries\Wire\utility\twi.c:25: fatal error: avr/io.h: No such file or directory
compilation terminated.
I can find the missing io.h header file but it's not anywhere near the searched area. It's found at the following location.
C:\Users\xxxxx\Downloads\Arduino\arduino-1.5.1r2-windows\arduino-1.5.1r2\hardware\tools\avr\avr\include\avr
So the question is: how do I get it to look in the right location? Since I'm using the 2.8" TFT, I expect other errors to come up later. However, I have to fix them as they show up.