It was not my intent to discuss IDE ways to use headers.
But how the IDE works, users header file names, and locates the Arduino library directories, directly relates to getting newLiquidCrystal library package up and working correctly.
Here is an compiler output which suggest that these “libraries” were not useful perhaps not used would be better message.
But since it was mentioned - the “library” is indeed identified by its directory name.
I don’t see any compiler output in that post.
There is a tiny bit of IDE output near the bottom complaining about invalid libraries.
The message about an invalid library is not a message about an unused libary.
That would look more like this:
Multiple libraries were found for "LiquidCrystal.h"
The IDE does not like something in those directories or their names.
Not sure what OS you are on or what IDE you are using but there are many issues related to naming due to needless naming restrictions enforced by the IDE and it varies by IDE version.
The IDE identifies a “library” being used or directory where the source code for the library “lives” by the name of the header file being included. It searches for the header file name in all the “libraries” directories in all the library locations (there are multiple) to see if it can locate the header file being included.
There is no requirement that <foo.h> live in a directory named foo
what is directly being said - you cannot have same named file in DIFFERENT directory.
Since when? Would that defeat the purpose of files hierarchy in directories?
You are not understanding what was said or the issue.
It isn’t that you can’t have a header file with the same name in different Arduino “library” directories, it just that if you do, there will likely be issues because of the way IDE does its builds.
The IDE uses the header file name being included to locate the directory where the Arduino “library” lives.
If there is more than one directory with the same header file name, there is no guarantee that the IDE will pick the one you want. (The older IDEs simply use the first one they see) There are rules that the IDE uses to try to help minimize the issue (which also have changed through time in various IDE releases), but depending on the location of where the library is installed, the directory named used, and how many header file name conflicts there are (there can be multiple) or the IDE version you are using, you can have a situation where the sketch cannot be built and linked.
In the case of multiple collisions you can have a situation where the IDE correctly identified the correct libraries and their directories but because of the way it uses the include path to tell the compiler where to look for header files, the compiler can end up picking the header file from the wrong Arduino library.
This is a side effect of using the include path to locate the header files. There is no way to resolve this.
(In nearly 40 years of s/w development, I’ve never seen any other build system that does things this way)
The newLiquidCrystal library definitely has conflicts with other libraries, including the IDE bundled LiquidCrystal library and that is why it has a very explicit way of being installed.
If you don’t follow its recommendations for installation, there is likely to be issues.