本文介绍了在Visual Studio的链接命令上取消/DEBUG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法取消Visual Studio(2015+)链接命令上的/DEBUG 命令行参数?

Is there a way to cancel the /DEBUG command line argument on Visual Studio's (2015+) link command?

我尝试了/DEBUG:NO /DEBUG-,但是都无法识别.

I've tried /DEBUG:NO and /DEBUG- but neither is recognized.

推荐答案

在项目的属性中,选择 Linker->.调试选项页面,然后关闭生成调试信息",如下所示:

In the project's properties, select the Linker -> Debugging options page and turn off "Generate Debug Info," as shown below:

(如果未显示此选项,请确保禁用所有其他调试"选项,例如 Configuration Properties-> Advanced上的"Use Debug Libraries" 页面.)

(If this option is not shown, be sure that all other 'debug' options are disabled, such as "Use Debug Libraries" on the Configuration Properties -> Advanced page.)

或者,要明确地关闭命令行构建中的/DEBUG 选项,则可以使用/DEBUG:NONE 开关.

Alternatively, to explicitly turn off the /DEBUG option in command-line builds, you can use the /DEBUG:NONE switch.

这篇关于在Visual Studio的链接命令上取消/DEBUG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 08:00