How to create Custom Preprocessor?

Follow the instructions in the link by jwatte.
I have successfully dynamically loaded and unloaded dll’s in the past (for a plotter device).
You can then use all of the methods needed from your dynamically linked library.

If you can just generate dll files in place of libs so that they can be changed at runtime. (should be easy if you have their source).