Something I’ve been meaning to share for a long time, and it is Sunday so I have a little time to share!
Basically, my code base is large. So large, that if I were to build it for Windows as a straight-ahead project, I get LNK1248, e.g.:
fatal error LNK1248: image size (blah) exceeds maximum allowable size (FFFFFFFF)
Interestingly, I first started seeing these error codes appear with debug builds, before I started seeing them with release builds.
I found those errors even when using Visual Studio 22 with a 64-bit toolchain.
My solution has been to divide-up my code into a number of static libraries:
Static Library for App 1 - my code
Static Library for App 2 - my code (even more of it)
Static Library for App J - the JUCE code
App - this is pretty minimal, just a main.cpp
For my convenience, when building VST3, I have separate copies with completely different target rules caused by the need to use multi-threaded DLL flags
Static Library 1 for VST3 - my code
Static Library 2 for VST3 - my code etc.
Static Library J for VST3 - the JUCE code
VST3 - this is pretty minimal, just the code adaptor layer appropriate for VST3 (Processor, Editor).
Furthermore, because I build for ARM64 as well as x64, all the above target both x64 and ARM64.
Because of my special requirements, I maintain all the project files manually.
Hoping this helps somebody out there!
Best to all, Pete