acroscene
acroscene

Reputation: 1067

Visual studio 2019 compile and build

Im learning c++, just began and want to make sure I got it right, in visual studio; pressing compile and after that build is that the same thing as pressing Local Window Debugger with the Release option?

Upvotes: 0

Views: 1615

Answers (1)

Zeus
Zeus

Reputation: 3880

First of all, compiling and building is basically the same as creating files when using Local Windows Debugger in Release mode. But the Local Windows Debugger will start the application and open the debugger, so it will perform some other operations.

Second, cl [filename] and then run in the terminal is very different from the local window debugger. The local window debugger will perform additional optimization according to the settings and provide us with the corresponding information according to the specific command line parameters, while the cl command needs to provide more option commands at build time, you can refer to https://learn.microsoft.com/en-us/cpp/build/reference/compiler-command-line-syntax?view=vs-2019.

Finally, running the build in Visual Studio first compiles the source code into an object file, and then links the external file to form an executable file. It also includes our optimization and control of the generated program. We can change it by adding command line parameters or in the Visual Studio settings.

Upvotes: 1

Related Questions