Pre-compiled headers of Visual Studio

Source: Internet
Author: User

During my previous internship in a company, I got an update every day when I got started.Code, Compile the code. the whole SLN was compiled once. On my machine, I calculated the time, which was nearly three hours .. the concept is to go to work at half past nine am. After compilation, you can take a nap. I couldn't stand it anymore. I searched for the method to add the pre-compiled header on the Internet and shouted in the work group. the pain of being an intern.

I didn't expect to add the compilation header at the beginning of completing the setup, but the more code I write, the more I can't handle the compilation speed. the pre-compiled header was decisively added today, and the speed is really fast... I met.

Project-> properties-> C/C ++-> pre-compilation header-> select "Create Pre-compilation header (/YC)" And enter XXXX. h In the next line.

Then add # include "XXXX. H" to the first line of each. cpp, compile and generate the. PCH file.

If it is # include "xxxx/YYYY. H", you need to fill in the corresponding xxxx/YYYY. h In "create precompiled header (/YC)" in the next line ..

The last step is to put some. H files that are not often changed into XXXX. h.

Related Article

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.