Hello
I'm having troubles using libraries in my sketch location when I want to include them in arduino IDE tabs (.h header files).
IDE somehow skips these includes unless they are in the main program.
For example when I build the main program I get output
Using library Wire in folder: /home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/libraries/Wire
Using library LiquidCrystal_I2C2004V1 in folder: /home/alex/Dropbox/u1/Arduino/libraries/LiquidCrystal_I2C2004V1 (legacy)
/home/alex/Apps/arduino-1.6.5/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/cores/arduino -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/variants/standard -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/libraries/Wire -I/home/alex/Dropbox/u1/Arduino/libraries/LiquidCrystal_I2C2004V1 /tmp/build4605378351205613475.tmp/Menus.cpp -o /tmp/build4605378351205613475.tmp/Menus.cpp.o
But when I move includes in one of my class header file I get unrecognized files
/home/alex/Apps/arduino-1.6.5/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/cores/arduino -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/variants/standard /tmp/build4605378351205613475.tmp/Menus.cpp -o /tmp/build4605378351205613475.tmp/Menus.cpp.o
In file included from Menus.ino:7:0:
/tmp/build4605378351205613475.tmp/Menu_I2CLCD.h:5:18: fatal error: Wire.h: No such file or directory
#include <Wire.h>
^
compilation terminated.
Error compiling
It seems to me IDE does not parse includes in other files except in main program code - the parameter -I/home/alex/Apps/arduino-1.6.5/hardware/arduino/avr/libraries/Wire -I/home/alex/Dropbox/u1/Arduino/libraries/LiquidCrystal_I2C2004V1 is missing in those...
Is there a workaround?