在Debug中构建项目的方式与Release中的不同? [英] How does building a project in Debug differ with in Release?

查看:139
本文介绍了在Debug中构建项目的方式与Release中的不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在visual studio或任何其他IDE中,通常有两种构建配置,Debug和Release?
有什么区别?为什么有时候在构建Debug模式时有编译错误,但不是在Release模式下,反之亦然?

In visual studio or any other IDE, usually there are two build configurations, Debug and Release? How does the differ? Why sometimes you have compile errors when building in Debug mode, but not when in Release mode, and vice versa?

推荐答案

调试编译使用符号,并允许您在运行时查看代码。它还对变量进行了一些初始化,以帮助进行错误跟踪过程。

Debug compiles with symbols and allows you to "see" your code when it runs. It also does some initialization of variables to help in the bug tracking process.

发布通常是优化的,不生成调试数据。

Release is generally optimized, and does not generate debug data.

一般来说,当您编译问题在两者之间切换时,它涉及到文件夹的硬编码路径。

Generally when you get compile issues toggling between the two, it relates to hard coded paths to folders.

MSDN上的配置

这篇关于在Debug中构建项目的方式与Release中的不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆