Troubles with C1060: compiler is out of heap space

I am currently trying to compile my project with a large header file. This .hpp is ~1,000,000 lines and always returns the C1060 error using the default MSVC. I have 64gb of RAM and I have increased my virtual memory (page size) in Windows to >256GB and restarted. Switching to the Clang compiler works, however, Clang is incompatible with many of the plugins I am using, so it is not a viable option. I attempted to make the math library I am using into a .DLL, but it turns out you need to include the header to use the DLL and the size of that header is what is causing the error.
PublicDelayLoadDLLs.Add and RuntimeDependencies.Add with
THIRD_PARTY_INCLUDES_START/_END doesn’t seem to work.

Does anyone have any clue on what could be done to fix this?

Can you please post your answer?
So many people post their issue and never the resolve.