Is there any way to force visual studio to link all symbols from a lib file into the dll as atm it is optimizing \"unused\" functions which are needed by the program using t
Tested in MSVC2k17...
__pragma(comment(linker,"/export:REGISTERfunc"));
void REGISTERfunc() { printf("I'm linked!\n" ); }
Totally works. This can even be inside a statically linked .lib and will carry through all the way to the output executable and beyond!
EDIT: You can even put it in a macro for bonus awesome points!
EDIT: Another note: You must link-time code generation enabled. /LTCG ... something