error finding library, but I didn't try to include one!

So I had been testing some code off github that did use a custom library and could not get it to work, it was giving me a no directory found error.

But that's not what I'm asking about here, that's just background.

So then I temporarily gave up on that and went to a whole new sketch I had been writing myself earlier. It has compiled before and when I tried to upload it I get an error saying it can't find the library. The library from the previous sketch. ? ? ? ? ? ? ? ? ? ? ? ? ?

No where in my sketch does it try to include that library, only it seems to think that the exact same line from the previous sketch is in the new sketch. It's the same literal error code. I've tried restarting the program as well as my computer but it's bafflingly still doing the exact same thing.]

Have any of you experienced this? Does the IDE have some kind of "cookies" that I could clear? How is it even possible that a separate instance of the IDE in a totally new file could be so corrupted?

Obviously my last resort is to uninstall and reinstall, but I'd like to know what the problem is so I don't end up doing that just to have the issue persist.

TIA!

The IDE does have a build cache that makes subsequent compilations faster. It should be overwritten when you start a new sketch but maybe something went wrong. The cache should also be deleted when you close the IDE. Have you tried restarting it?

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code tags just in case there might be a clue there to the cause of the problem.

Yes, I've restarted everything, computer included. The only thing I haven't done is a new install of the IDE.

Here's the error:

Arduino: 1.6.8 (Windows 8.1), TD: 1.28, Board: "Teensy LC, Serial, 48 MHz, US English"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Users\Samantha\Documents\Arduino\libraries" -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,keys=en-us -ide-version=10608 -build-path "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp" -warnings=none -verbose "C:\Users\Samantha\Documents\Arduino\mux-stock-code\mux-stock-code.ino"
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Users\Samantha\Documents\Arduino\libraries" -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,keys=en-us -ide-version=10608 -build-path "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp" -warnings=none -verbose "C:\Users\Samantha\Documents\Arduino\mux-stock-code\mux-stock-code.ino"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\v2\ERW_CD74HC4067_INPUT_example\ERW_CD74HC4067.cpp" -o "nul"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp" -o "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp" -o "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp" -o "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\mux-stock-code.ino.cpp.o"
"C:\Program Files\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=128 -DARDUINO=10608 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\v2\ERW_CD74HC4067_INPUT_example\ERW_CD74HC4067.cpp" -o "C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\v2\ERW_CD74HC4067_INPUT_example\ERW_CD74HC4067.cpp.o"
C:\Users\Samantha\AppData\Local\Temp\build41c771c2dfb7688b87e779c2e7be248f.tmp\sketch\v2\ERW_CD74HC4067_INPUT_example\ERW_CD74HC4067.cpp:19:28: fatal error: ERW_CD74HC4067.h: No such file or directory

 #include <ERW_CD74HC4067.h>

                            ^

compilation terminated.

Error compiling for board Teensy LC.

This is the error message. Which, as far as I can tell, is the exact same error that the previous sketch was throwing.

Is it normal that it's telling me this is in a temp folder, even though the sketch was opened from a normal folder?

It looks like you have a .cpp file in a subfolder of your sketch folder:
C:\Users\Samantha\Documents\Arduino\mux-stock-code\v2\ERW_CD74HC4067_INPUT_example\ERW_CD74HC4067.cpp

that has at line 19 the code:

 #include <ERW_CD74HC4067.h>

That's the cause of the error. Even though not shown in the Arduino IDE, in your version of the Arduino IDE the source files in subfolders of the sketch folder are compiled. This behavior has been changed in recent IDE versions to only do this in the src subfolder of the sketch folder. So you have some options:

  • If the contents of v2\ERW_CD74HC4067_INPUT_example are necessary for your sketch to work then you will need to find out why it can't find the file ERW_CD74HC4067.h. Keep in mind that the #include <foo.h> syntax will only search the standard library folders, not the sketch folder. If your header file is located in the sketch folder you need to use the #include "foo.h" syntax.
  • If the contents of v2\ERW_CD74HC4067_INPUT_example are not necessary for your sketch then move them elsewhere.
  • If you don't want to move the contents of v2\ERW_CD74HC4067_INPUT_example elsewhere then update to a recent version of the Arduino IDE.

There might be a special subfolder name you can put things in that causes them to be ignored by the Arduino IDE. I can't remember what the name of it was.