Including a library after booting


Well-known member
Hey all

So, you usually include the libraries you want at the start of your code.

I have a Teensy 4.1 that you can add stuff to 'on the fly'. But, this then means the library for that added on feature isn't there.

I don't want to include all the possible libraries 'just in case' as that seem very wasteful of resources as I will rarely need more than one at a time.

Is there any way to invoke/include a library during the setup part of the code? (basically after it's been identified as required)
#include's happen at compile time. You are asking for something like dynamically linked runtime libraries, loaded from a filesystem at runtime (SDcard?), or something like code overlays.

Do you actually have a problem with running out of code or data space? If not just #include them all.
I could include them all..... but there are potentially quite a lot of them.
I think that is what I will have to do