How to configure implementation command-line compilation C + + programs under Windows

Source: Internet
Author: User

Do you know the kind of command-style compilation that compiles C + + code under Linux, do you want to do this in Windows? Today I used my Windows desktop computer and laptop computer to implement this kind of command-style C + + code compilation.

The first tool you need is:

1. A computer under Windows (of course, a computer with a C + + compiler installed)

2. Download software to install a text editor (e.g. Notepad, etc.)


Here are the specific steps to implement such a feature:

1. First of all the system environment variables to set (the specific environment variables can be set to Baidu), the main environmental variables are three: Lib,include,path;

Set the following:

Lib:c:\program Files (x86) \microsoft Visual Studio 9.0\vc\lib;

Include:c:\program Files (x86) \microsoft Visual Studio 9.0\vc\include;

Path:c:\program Files (x86) \microsoft Visual Studio 9.0\vc\bin;


2. At this point you compile but there will be mspdb80.dll not found error, this time the solution is:

Typing cl in cmd occurs when Mspdb80.dll cannot be found, because there are no "msobj80.dll,mspdb80.dll,mspdbcore.dll,mspdbsrv.exe" files under vc/bin/( There are no four files in VS2005), the workaround:

1> directly from the common7/ide/copy these four files to vc/bin/can be resolved

2> Add the system variable (Path), so: System variable--environment variable----Properties------------add C:/Program to Path Files/microsoft Visual Studio 8/ Common7/ide, pay attention to the end of the last with ";" Separate! This can be compiled with CL will not appear the Mspdb80.dll file cannot find the error


3.1th steps and 2nd step, basically can compile C + + program, using CL **.cpp/link user32.lib can be.


How to configure implementation command-line compilation C + + programs under Windows

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.