1. Relationship between project and solution
A solution can have one or more projects.
Generally speaking, when creating a project, a solution is created, and because the solution name is the same as the project name, the folder structure will look messy.
Sort out the various files generated under each folder.
2. Test
1. Create a new project. Create a solution at the same time, for clarity, change the name of the solution to something different, solution – sln_test. project1 – project1. t At the same time create a project 2—project2. At the same time, create a new source file for each project – source.cpp. The file structure is as follows:
D:\CODE_CPP\SLN_TEST
│ sln_test.sln 解决方案文件
│
├─Project1
│ Project1.vcxproj 项目文件**
│ Project1.vcxproj.filters 筛选器文件
│ Project1.vcxproj.user 是本地化用户配置
│ 源.cpp
│
└─Project2
Project2.vcxproj
Project2.vcxproj.filters
Project2.vcxproj.user
源.cpp
2. Look at the file directory after running the source file.
There are four options for running
- debug x86
- release x86
- debug x64
- release x64
First run in the case of option 1 and 2, and see that two folders debug and release are generated, and two projects are placed respectively to generate exe files.
It is worth noting that there are debug and release folders under the solution folder; there are also debug and release folders in the project folder
For the solution there are debug and release folders
D:\CODE_CPP\SLN_TEST\DEBUG
Project1.exe 执行文件 如果要链接dll文件,要放在解决方案的debug目录下,和exe同级
Project1.ilk 一种链接临时文件
Project1.pdb 一种 3Com PalmPilot 数据库文件
Project2.exe
Project2.ilk
Project2.pdb
D:\CODE_CPP\SLN_TEST\RELEASE
Project1.exe
Project1.iobj
Project1.ipdb
Project1.pdb
Project2.exe
Project2.iobj
Project2.ipdb
Project2.pdb
For projects there are also debug and release folders
├─Debug
│ │ Project1.log 日志文件
│ │ vc141.idb 一种 MSDev 中间层文件
│ │ vc141.pdb 一种 3Com PalmPilot 数据库文件
│ │ vcpkg.applocal.log 和vcpkg相关的log文件,vcpkg是一种c++安装包管理器
│ │ 源.obj 一种对象文件 汇编生成.obj文件
│ │
│ └─Project1.tlog
│
└─Release
│ Project1.log
│ vc141.pdb
│ vcpkg.applocal.log
│ 源.obj
│
└─Project1.tlog
Source file (cpp) —> preprocessed (.i) —> compiled (.s) file —> assembled (.obj file) —> linker (link .dll and .lib) —> executable file (.exe)