Thanks all for your wise advice!
I was working with an SSD 1306 128x64 spi oled module (and the adafruit lib port)
Geting the display to work is not so much my prime concern, but thanks for the assistance anyway
It's more about having the library structure setup as such that I could easily swap between the various MCU platforms
(Arduino ESP8266 and STM32) and still keep everything working from the same IDE
As that would allow me to chose the best board for a certain job. (wifi enabled, more or less speed, more interrupts, more or less GPIO etc.)
For the same filename in the same spot problem you're right Ray.
I know no OS that can handle this nicely.
However It does not need to have the same name or sit in the exact same directory.
As long as I know what to append or prefix to the library name I'm good I guess.
For me that makes life as simple as focusing on the correct include statements and pin layout.
The rest of the code can be kept more or less the same/similar and thus makes it posible to port between hardware much simpler.
But now it's not like there is one Library directory tree that contains all the magic.
it's in various independant dir trees.. which is somewhat confusing.
the program files tree, in the users/local/apps tree and in the users/my documents tree..
well that makes newbies like me mad until they understand the order of inclusion.
so indeed if all would be sitting local to the sketch it probably solves that problem and uploads the sketch nicely to the board.
Once I've figured it out I'm more than happy to share what I did to get things moving.
Or I'll switch IDE It's not like I'm married with it anyways.