2016/01/10 C ++ Primer note-command line compiling environment configuration, 2016 primer

Source: Internet
Author: User

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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.