什么是用于OBJ和bin文件夹(由Visual Studio创建的)? [英] What are the obj and bin folders (created by Visual Studio) used for?

查看:598
本文介绍了什么是用于OBJ和bin文件夹(由Visual Studio创建的)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了Visual Studio 2010的一个新项目,并注意到,现在有两个名为新的文件夹 OBJ 在我的项目目录。

I created a new project in Visual Studio 2010 and noticed that there are now two new folders named obj and bin in my project directory.

构建和调试时,会创建一对相似的文件夹 - 这些是什么文件夹

A similar pair of folders are created when building and debugging - what are these folders for?

推荐答案

OBJ 文件夹包含对象,或中间,文件,这是编译尚未链接还二进制文件。它们基本上是将被组合以产生最终的可执行片段。编译器为每一个源文件一个对象文件,这些文件被放置在 OBJ 文件夹中。

The obj folder holds object, or intermediate, files, which are compiled binary files that haven't been linked yet. They're essentially fragments that will be combined to produce the final executable. The compiler generates one object file for each source file, and those files are placed into the obj folder.

文件夹包含二进制文件,这是实际的可执行code为您的应用程序或库。

The bin folder holds binary files, which are the actual executable code for your application or library.

这些文件夹中的每一个进一步细分为调试发布文件夹,简单地对应到项目的构建配置。这两种类型以上讨论的文件放置到相应的文件夹,这取决于哪种类型的执行构建。这很容易让你确定哪些可执行文件与调试符号建成,并用启用并准备发布优化构建。

Each of these folders are further subdivided into Debug and Release folders, which simply correspond to the project's build configurations. The two types of files discussed above are placed into the appropriate folder, depending on which type of build you perform. This makes it easy for you to determine which executables are built with debugging symbols, and which were built with optimizations enabled and ready for release.

请注意,您可以更改的Visual Studio在项目的属性在编译过程中输出的可执行文件。您还可以更改的名称和选择的选项为您构建配置。

Note that you can change where Visual Studio outputs your executable files during a compile in your project's Properties. You can also change the names and selected options for your build configurations.

这篇关于什么是用于OBJ和bin文件夹(由Visual Studio创建的)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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