Solution to the problem of the compilation error of boost in VS

Source: Internet
Author: User

The landlord is using Visual Studio 2015 (Community Edition) and boost1.60.0 version

Issue one: Path settings at installation time

Lou Zhu Small White, for the compiler operation principle also only know each approximate, library file what before also not too understand is used to do what, according to boost installation tutorial, set the library file in VS and include the header file, encountered a bit of trouble, in compiling the file has been unable to find the file you want to find. Landlord Baidu, directly will boost the root directory of the boost files and the stage directory in the Lib folder library files, respectively copied to the VS installation path VC's include folder and Lib folder, problem solving.

Second question: When compiling the source file containing the Boost component on the command line, prompt error:lnk2019 for external errors that cannot be resolved

At first, I thought it was missing the library file, so the landlord recompiled the whole boost library, but the error was still when compiling the source file with the Boost component on the command line.

Later, the landlord in the boost root directory with Bjam view, Date_time Library display is already building completed, there is no loss of library files. So the landlord suspect may be compiled boost source files when the compiler version is not correct, because the landlord is directly called the command line of the CL command to compile, may be called the compiler version is not the version of the compiler that comes with Visual Studio 2015. The landlord created a new project in Visual Studio 2015, which was compiled directly in the IDE and solved the problem.


Attach your own method records that set the Visual Studio path:

My Computer-"Properties-" Advanced settings-"Environment variables

Path system variables plus Microsoft Visual Studio 14.0\vc\bin and Microsoft Visual Studio 14.0\common7\ide

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.