I'm writing a very small DLL that's supposed to be just a wrapper that will let a different DLL use functions in the main program. My problem is that I'd like not to link dynamically to the VC++ runtime, but linking statically multiplies the size by a factor of 15. This is a bit steep, given that the runtime is already included in the main program. Is there some way I could let the linker know that the functions will be available when the DLL is loaded? I've done this before with my own code by exporting symbols from the program and linking the generated LIB to the DLL, but I don't know if this is possible with runtime functions, and it's a different situation because the DLL will be loaded by a second DLL that I have no control over, not the main program.
I've already tried disabling features I don't need, such as RTTI and exceptions, hoping that the linker would avoid linking unnecessary functions, but that barely chipped away the binary.
By the way, to my surprise, MinGW generated an even bigger DLL.