I have a rather large and complex GUI application. This application can run in batch mode and I have an academic user who wants to run it headless (no GUI) on a cloud.
Is there a simple way to recompile a CtrlLib application to run without it's GUI or is the only way for me to use preprocessor directives to cut out all the GUI code?
Yes. You have to use Rainbow to supply "Nil" GUI, which can be represented by "Skeleton" package.
As example, see uppweb; it runs completely headless on our web server but it still includes "ide" package (as quick and dirty fix to include documentation).