Web IDE - how to conditionally exclude a library

Have built code to handle CORE and PHOTON variants by way of the PLATFORM_ID define.

Now wish to add the ELECTRON product. Problem is that the Neopixel library kicks up a compile error saying that it can only handle CORE or PHOTON platforms.

What I wish to do is not link in an included library via a conditional. How does one do this?

Unsurprisingly excluding the header does not do the trick.

Thanks @UMD

What about adding an #if PLATFORM_ID < 10 in the library cpp file itself?

@jvanier, unfortunately I have not included the library source in the application, am just linking the library (using Web IDE). Really don’t want to include any more source due to using the WebIDE and it is getting a bit crowded, if you know what I mean.

Of course, if I did include the source, then your solution would work.

Thanks - @UMD