Are generic file names evil?

It was claimed here that generic file names can cause problems for the Arduino IDE.

In the Library Tutorial and the Library style guide there is no such rule mentioned. Also, most Open Source projects outside of the Arduino contains several "generic" file names.


  • Is this a real issue?
  • If it is, where is it documented? Why not in the library style guide?
  • Possibly it even qualifies as a bug?

It is not "generic" file names that cause a problem (whatever they are). It is having two files with the same name in different sub-folders within the libraries folder.

Some of the things that make the Arduino system easy to use don't work so well in complex situations.


Coincidentally, the most common example of duplicate file names causing problems is with the z3t0/Arduino-IRremote library. There is a file named IRremote.h in the RobotIRremote library included with the Arduino IDE. Normally the library located inthe {sketchbook}/libraries folder would have include priority but because the folder name of the IRremote library doesn’t match the include file name the file in the RobotIRremote library gets used instead. The worst thing is the Arduino robot was retired while the z3t0/Arduino-IRremote is very popular.

Another problem that has recently appeared is with the Time library. The latest version of avr-gcc used by the Arduino IDE as well as the compiler used either the SAM or SAMD core(I can’t remember which) has a file named time.h. On case insensitive operating systems such as windows this causes time.h to be included instead of Time.h, breaking quite a few different libraries that use the Time library.

Where is the indexing documented or described?

Are you asking about the Arduino IDE include priorities?