Arduino IDE not handling library code correctly? The author of the PinChangeInt library and the EnableInterrupt library states at github:


  When the PinChangeInt was in a .h and .cpp file, the Arduino IDE tried
  to compile it twice. I have a technique that you can use- #define
  LIBCALL_ENABLEINTERRUPT - that if you put it ahead of your #include in
  all files but the sketch, then you should be able to use the library
  without conflicts. If you know how to make it work in another way-
  remember, this is a library and will not compile in the same directory
  as the sketch and any other .h/.cpp/.ino files- then I'm all ears.


I came there, because both libraries failed to build with linker errors due to double definitions. So far so good. I split the PinChangeInt library in .h and .cpp myself and it compiled flawlessly. I did not try to split the other library yet because it looks like much work to me. 

So now my question(s): Is GreyGnome right with his statement, that library code gets compiled twice when split in code and headers? And if so, what are the consequences? Memory waste? Runtime errors? What about the many other (working) libraries exhibiting separate code and header files?
Header files are parsed by the preprocessor and the compiler wherever they are included.

There's nothing weird about that.
One can avoid multiple inclusions by using header guards.
That's pretty standard too.

I have not looked at the library, but, for example,  a typical error is to not declare variables as extern in the header and instead leave the real declaration in the header, which will lead to multiple instances, possibly clashing at link time.
Variables that are part of the library API should be declared as extern in the header and the real declaration should be done only in the .C/.CPP file.

Interrupts are an even more special case: the AVR gcc relies on very specific names to identify interrupt handlers and each of them can be present at most once.
So there are even more chances for having linker problems, if not declared correctly.