[Solved] Error compiling on the Web IDE

Hi

My code compiles fine with the standard windows IDE but gives the following error when compiled with the web IDE:

./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/479235461/build -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -libraries /tmp/479235461/pinned -libraries /tmp/479235461/custom -fqbn arduino:avr:uno -build-cache /tmp -logger humantags -verbose=false /tmp/479235461/temp_test

Multiple libraries were found for "EEPROM.h"

Used: /home/admin/builder/opt/cores/arduino/avr/libraries/EEPROM

Not used: /home/admin/builder/opt/libraries/latest/arduino-nvm-0-9-1

Multiple libraries were found for "SoftwareSerial.h"

Used: /home/admin/builder/opt/cores/arduino/avr/libraries/SoftwareSerial

Not used: /home/admin/builder/opt/libraries/latest/printoo_library-1-0-2

In file included from /home/admin/builder/opt/libraries/latest/usb-host-shield-library-2-0-1-3-1/settings.h:20:0,

from /tmp/479235461/build/sketch/IRsend.h:5,

from /tmp/479235461/temp_test/temp_test.ino:8:

/home/admin/builder/opt/libraries/latest/usb-host-shield-library-2-0-1-3-1/macros.h:19:2: error: #error "Never include macros.h directly; include Usb.h instead"

#error "Never include macros.h directly; include Usb.h instead"

^

exit status 1

Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's ok to add it as an attachment. I think you can also share sketches via the Arduino Web Editor if you prefer.

pert:
Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's ok to add it as an attachment. I think you can also share sketches via the Arduino Web Editor if you prefer.

Change line 5 of IRsend.h and line 3 of Settings.cpp from:

#include "settings.h"

to:

#include "Settings.h"

Windows filenames are case-insensitive but the Arduino Web Editor runs on Linux where filenames are case sensitive. The file you intended to include is named Settings.h, not settings.h. If you were using the standard Arduino IDE on a case sensitive OS you would likely get a less confusing "file not found" error from this code but the Arduino Web Editor has something like 2000 libraries installed so it happens that one of those libraries has a file named settings.h, which was included instead of the file you intended. For some reason that file generated the more confusing error you encountered, which made it more difficult to determine the problem.

pert:
Change line 5 of IRsend.h and line 3 of Settings.cpp from:

#include "settings.h"

to:

#include "Settings.h"

Windows filenames are case-insensitive but the Arduino Web Editor runs on Linux where filenames are case sensitive. The file you intended to include is named Settings.h, not settings.h. If you were using the standard Arduino IDE on a case sensitive OS you would likely get a less confusing "file not found" error from this code but the Arduino Web Editor has something like 2000 libraries installed so it happens that one of those libraries has a file named settings.h, which was included instead of the file you intended. For some reason that file generated the more confusing error you encountered, which made it more difficult to determine the problem.

Thanks, it works now.