Why is DisplayN18.cpp compiled when not used

I’ve created my own version of class display_n18.
I named the class display_n18_osre and the files DisplayN18_osre.h/.cpp
Now I get an conflict because the global symbol 'characters is defined twice.
DisplyN18.h is not included anywhere and it is not visible in the external dependencies.

So why is DisplayN18.cpp still compiled and how can I prevent this?

Edit: In my version I surrounded the characters array with the gadgeteering::modules namespace to prevent the conflict.
But there must be a better solution to handle such issues!?

The way the Arudino IDE works is to compile all CPP files that we distribute in the library. The only way to get it to not use our file is to remove it from the directory, surround the specific code with an #ifdef you control, use a namespace like you did, or change the name of your characters array. In the future, we will look into moving the characters array out of the global namespace.

@ John - I guessed that. No wonder it takes so long to compile :wall: