Visual C++를 사용하다 보면 여러가지 파일들이 자동으로 생성되는데,
이들 중 다음 파일들은 항상 자동 생성될 수 있으므로 백업시 삭제하여도 무방하며
CVS와 같은 소스관리 프로그램에는 추가되지 않도록 하는 것이 좋다.
# Visual C++에서 지워도 되는 파일들
*.pch *.mdp *.ncb *.clw *.obj *.aps *.cpl *.awk *.exp *.idb
*.opt *.pdb *.map *.res *.ilk *.scc *.bsc *.sbr *.tlb *.plg
*.lib *.dll *.exe
# 그러나, 다음 파일들은 지워서는 안된다.
*.mak, *.dsp, *.c, *.rc, *.rc2, *.ico, *.bmp, *.txt, *.def, *.hpj, *.bat, *.rtf,
*.odl, *.inf, *.reg, *.cnt, *.cpp, *.cxx, *.h, *.hpp, *.hxx, *.inl, *.tpl, *.vtp, *.mst
*--- 파일 확장자별 설명 ----------------------------------------------------------*
참고로, 아래의 설명은 MSDN 도움말에서 발췌한 것임을 밝혀둔다.
프로그램 소스 파일
인라인 함수 파일: 인라인 함수들에 대한 정의 포함
.RC or .RC2
윈도우 리소스 파일(Resource file)
모듈 정의 파일(Module definition file)
.APS -- Binary version of the resource file:
This is the binary version of the current resource file. App Studio or the resource editor uses it for quick loading.
.BSC -- Browser database file:
A single .BSC file is created for each project. To use the Browser, you need to open this file in the Visual C++ Workbench. It is created from the .SBR files when the BSCMAKE tool is run.
.CLW -- Class Wizard status file:
This file keeps information about where message-handling functions are kept in your code. The format of this text file is undocumented, but it can be regenerated. For more information on how to regenerate this file, please click Contents on the Help menu in App Studio; then click "Using Class Wizard" and "Update Class Wizard when Code Changes."
.EXE or .DLL -- Executable or dynamic link library file:
This file is the final linked output file for the project. It contains executable code.
.ILK (versions 2.0 and later only) -- Incremental link information file:
The linker creates this file to allow incremental linking when possible. If you delete it, you will force the linker to perform a full link.
.OBJ -- Object module file:
This is the final output file from the compiler. The linker combines these files to create the final .EXE, .DLL, or .LIB file. The .OBJ files may have different formats in different versions of Visual C++ or in different vendor's compilers.
.PCH -- Precompiled header file:
These files can significantly speed up compile time. They are created when using the /Yc, /Yu, or /YX compiler options.
.PDB -- Program database file:
This binary file contains type and symbolic debugging information gathered over the course of compiling and linking the project. The file is for use with the Visual C++ debugger. Object files contain references into the .PDB file for debugging information. This design makes object files smaller. See the online reference under the /Zi switch for more information. When you use the /Z7 switch, this file is not created.
.SBR -- Source browser file:
This file is created for each source file compiled with either the /FR or /Fr switch. This file contains symbolic information used by the Microsoft Browser Database Maintenance Utility (BSCMAKE) to produce a browser database file (.BSC file).
.WSP -- Workspace information file (16-bit versions only):
This is a binary file containing information about the state of the WorkBench when it was closed. Such items as source files opened and their window positions are saved in this file.
.VCP -- Workspace information file (Visual C++ 2.x and later only):
This file is the Visual C++ version 2.x equivalent of the 16-bit versions' .WSP file.
.VCW -- Visual WorkBench Status file (16-bit versions only):
This file is created on a per-project basis. It works with the .MAK file to fully describe the project to the WorkBench.
.EXP -- Export file:
Export files contain information about exported functions and data items. When LIB creates an import library, it also creates an export file. You use the .EXP file when you link a program that both exports to and imports from another program, either directly or indirectly. If you link with an .EXP file, LINK does not produce an import library because it assumes that LIB already created one.
.LIB -- Library file:
These files could be standard library or import library files. Standard libraries contain objects and are created by the LIB tool. Import libraries contain information about exports in other programs and are created either by LINK when it builds a program that contains exports or by the LIB tool.
.MAP -- Map file:
A map file is a text file that contains information about the program being linked. The information includes the module name, the timestamp from the program file header (not from the file system), and a list of groups in the program with each group's starting address, length, group name, and class. It also contains a list of public symbols with each address, symbol name, flat address, and object file where the symbol is defined. A map file also includes the entry point of the program and a list of fixups.
.RES -- Compiled resource file:
The .RES file is created by the Resource Compiler (RC).
.HPJ -- Context-sensitive help project file:
This file appears when you use the Visual C++ AppWizard to create an MFC application that supports context-sensitive help. You need this file to create help files from the .RTF files and .BMP files generated by the AppWizard.
NCB -- Parser information file:
This file contains information generated by the parser used by the class view and component gallery. If the file is accidentally or deliberately deleted, it is automatically regenerated.
MDP -- Microsoft Developer studio Project file:
This file replaces Visual C++ version 2.x's .VCP file. The .MDP file contains more information about the project than does the .VCP file.
RCT -- Resource template file:
These files contain information on custom resources that can be used when you insert a resource. It can include menus, toolbars, bitmaps and any of the other resource types listed in the Insert Resource menu.
다음은 빌드 과정에서 임시로 생겼다가 사라지는두 가지 파일 들이다.
.CRF -- linker response file:
This file is created on the fly by the build process.
MSVC.BND -- copy of project .CRF file:
This file is created if the resources need to be bound to the executable. It is simply a copy of the project's .CRF file. There are some other files created depending on the features the project supports. For example, your project may also have one or more icon files with .ICO extensions, cursor files with .CUR extensions, or bitmap files with .BMP extensions. A project may also have a .REG file that has registry information for the project. Projects that support OLE may also have an .ODL file and .TLB files.