Practice VC + + compiler cl compile C / C + + program

Environment: windows already installed VS2005
1, set the environment variable
Objective: cmd window automatically identify cl command settings: in the "My Computer" -> Properties -> Advanced -> Environment Variables in
INCLUDE D: \ Program Files \ Microsoft Visual Studio 8 \ VC \ include;
LIB D: \ Program Files \ Microsoft Visual Studio 8 \ VC \ lib;
PATH increase in D: \ Program Files \ Microsoft Visual Studio 8 \ VC \ bin;

In the cmd window, enter the cl prompt "can not find mspdb80.dll" solution:

Will be D: \ Program Files \ Microsoft Visual Studio 8 \ Common7 \ IDE directory mspdb80.dll and mspdbsrv.exe copy to D: \ Program Files \ Microsoft Visual Studio 8 \ VC \ bin the next;

2, cl compiled C program example
(1) write a Hello.c Notepad file, as follows
# Include <stdio.h>
main ()
(
printf ("Hello, World for c! \ n");
)
(2) compile the program and execute the cmd command line window, enter cl Hello.c, you can see the information generated Hello.exe file command line in the cmd window and then enter the Hello
Can see the implementation of the results: Hello, World for c!

3, cl compile C + + program examples
(1) use Notepad to write a Hello.cpp file
# Include <iostream>
using namespace std;
int main (int argc, char * argv [])
(
cout <<"hello, world for c + +!" <<endl;
return 0;
)
(2) compile the program and execute the cmd command line window, enter cl Hello.cpp, you can see the information generated Hello.exe file command line in the cmd window and then enter the Hello
Can see the implementation of the results: Hello, World for c + +!

分类:CPP 时间:2010-06-13 人气:197
分享到:
blog comments powered by Disqus

相关文章

  • (Transfer) Ubuntu environment variables 2010-02-13

    Environment variable configuration file In Ubuntu, there are several files you can set the environment variable 1, / etc / profile: In the log, the operating system to use when customizing the user environment, the first file, the file system setting

  • How to read a user's crontab environment variables in parameters 2010-04-27

    How to read a user's crontab environment variables in parameters We all know that crontab is good stuff, you can perform some tasks regularly to help you monitor system status, to help you every day to do some mechanical things. However, there is cro

  • linux modify the system environment variables need to reboot the machine 2010-07-27

    1 summarizes the background In linux system, if you download and install the application, is likely to type its name when "command not found" prompt content. If the target every time to the installation folder, locate the executable file to be t

  • Ubuntu environment variables 2010-08-19

    Environment variable configuration file In Ubuntu, there are several files you can set the environment variable 1, / etc / profile: In the log, the operating system to use when customizing the user environment, the first file, the file system setting

  • linux, unix set, add, delete, script, environment variables 2010-04-28

    #~~~~~~~~~~~~~~~~~~~ New environment variable linux terminal: vi setEnv.sh #~~~ As follows: cd / etc FIVE_TWO_ZERO = $ 2 export FIVE_TWO_ZERO if [-f "profile"] then echo "">> profile echo "FIVE_TWO_ZERO = $ FIVE_TWO_ZERO&quo

  • linux set environment variables 2010-09-14

    linux set environment variables 1 Introduction In linux system, if you download and install the application, is likely to type its name when "command not found" prompt content. If the target every time to the installation folder, locate the exec

  • linux and windows environment variables see the difference 2010-12-16

    See below in the linux environment variable is useful echo $ ORACLE_HOME, the interview today, not under the windows. But you can use the set command to see all the environmental variable. The command set is very powerful, not only can view can also

  • Java environment variables for beginners problems 2010-12-10

    Java beginners problems Java beginners how to configure the Java development often confusing environment, the forum also has many friends in the JDK configuration questions to ask about, especially the configuration, compile the java file, is always

  • java environment variables configuration summary 2010-03-29

    windows xp configure JDK environment variables: 1. Install JDK, the installation process you can customize the installation directory and other information, for example, we have chosen to install directory is D: \ java \ jdk1.5.0_08; 2. The installat

  • Linux Java environment variables set up under 2010-04-02

    This article comes from: http://wangdehe88.blog.163.com/blog/static/123328662009104103126832/ Familiar with the linux 1.Linux under the JDK installation The download JDK binary executable file, not talked about here, we go directly to the official we

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.479 (s). 13 q(s)