且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Windows上的本机C ++应用程序中的自动死代码检测?

更新时间:2022-03-08 09:28:01

要求链接器删除未引用的对象(/ OPT:REF)。如果使用函数级链接和详细链接器输出,链接器输出将列出可以证明未使用的每个函数。此列表可能远未完成,但您已拥有所需的工具。

Ask the linker to remove unreferenced objects (/OPT:REF). If you use function-level linking, and verbose linker output, the linker output will list every function it can prove is unused. This list may be far from complete, but you already have the tools needed.