Microsoft c/c++/c# compiler command line mode settings and usage

Source: Internet
Author: User
Tags microsoft c

Microsoft c/c++/c# compiler command line mode settings and usage

Microsoft c/c++/c# compiler command line mode settings and usage


Command-line mode compiles faster than compiling in the IDE, and avoids some additional information that is generated by the IDE
The interference. This article describes the Microsoft C/c++/c# compiler command-line mode settings and usage. Operating system for Windows
2000.

A Microsoft C + + compiler command line mode settings

Method One

1. Write a batch file, based on the following (as appropriate to your system situation),
Assume that the name is Vs.bat.

@echo off

Set Path=c:\winnt\system32;d:\vs.net\vc7\bin;d:\vs.net\common7\ide

Set Include=d:\vs.net\vc7\include

Set Lib=d:\vs.net\vc7\lib

Description

A. The above environment variable string case does not matter, but the characters should avoid the occurrence of spaces.

B. The reason for adding C:\WINNT\SYSTEM32 is to facilitate the use of extension commands such as help, and
The topic of this discussion is not directly related.

2. Open a command Prompt window and execute the following command:

C:\>start C:\vc7.bat (depending on your file path, make the appropriate changes)

A new command Prompt window will be created where you can compile your C + + program. With
Body usage, in the back.

The disadvantage of this setup method is that it can only be compiled in the newly created Command Prompt window in step 2, once
Close the window, which requires you to re-execute step 2.

Method Two

1. On the desktop My Computer icon, right-click and execute the Properties menu command, or,
According to the "Start"-"Settings"-"Control Panel" step, double-click the "System" icon, will pop up "system special
dialog box. Select the "Advanced" page and click on the "Environment variables" button, which will appear as shown in Figure 1, the environment changes
Volume Settings window. (Note: Any user can increase/delete/change user environment variables, but only administrators can increase/delete
/Change the system environment variable. User environment variables can vary for each user of a particular computer



Figure 1

2. You can set the user environment variable or set it to the system environment variable. Refer to the following and
See the interface shown in Figure 2. (according to the situation of your system, make corresponding adjustments)

Path=c:\winnt\system32;d:\vs.net\vc7\bin;d:\vs.net\common7\ide

Include=d:\vs.net\vc7\include

Lib=d:\vs.net\vc7\lib



Figure 2

And method one is different, in this way, once set up, you can once and for all. No need to restart the calculation
Machine, open a command prompt window now and try the CL command.

Note: If your operating system is Windows 95/98, you can refer to the above description, directly edit Autoexec.bat
File.

Microsoft c/c++/c# compiler command line mode settings and usage

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.