Is there such an option for visual studio to optimize away code which isn't used at any point within code?
For example if I have function int foo(bar b)
in my static library, but the executable I link it into does not use that function. Will that function be optimized away by the compiler / linker? If not then is there a way to make this kind of optimization using compiler / linker option in visual studio?