2016/01/10 C ++ Primer note-command line compiling environment configuration, 2016 primer
OK! First blog! Congratulations!
I read the first few pages of this book today. Well, it's quite complete and easy to understand.
I have learned c ++ before, but have never used command line compiling.
This is the compiler in vs. the file name is cl.exe, which is in the VC directory.
Although the compiler is available, it cannot be used directly. You need to configure environment variables.
Write a batch processing file and write the environment variable setting code in it, as shown below:
@ Set PATH = D: \ Microsoft Visual Studio 12.0 \ VC \ bin // You can also remove the @ character and enclose the PATH with double quotation marks, but it is not recommended to do that @ set INCLUDE = D: \ Microsoft Visual Studio 12.0 \ VC \ include @ set LIB = D: \ Microsoft Visual Studio 12.0 \ VC \ lib; C: \ Program Files (x86) \ Microsoft SDKs \ Windows \ v7.1A \ Lib
It is not recommended to add quotation marks to the path.
Enter the name of the batch and press Enter.
In short, we need to configure each database and other so that cl can run correctly.
The compilation process is as follows:
Cl HelloWorld // suffix omitted