在DOS下编写并运行C程序 :sanqima
https://blog.csdn.net/sanqima/article/details/7473078
1)“开始”--“运行”--cmd---回车,进入DOS界面,
C:\Documents and Settings\Administrator>cd C:\Documents and Settings\Administrat
or\桌面
2)先创建一个C程序,命名为cyuyan.c,如下:
C:\Documents and Settings\Administrator\桌面>copy con cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
^Z
已复制 1 个文件。
C:\Documents and Settings\Administrator\桌面>type cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
注意:^Z表示使用Ctrl+Z快捷键,来终止文件的写入。
3)对cyuyan.c文件进行编译,使用cl cyuyan.c命令,如下:
C:\Documents and Settings\Administrator\桌面>cl cyuyan.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
cyuyan.c
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:cyuyan.exe
cyuyan.obj
4)最后,执行cyuyan.c程序,输入cyuyan.exe即可,如下:
C:\Documents and Settings\Administrator\桌面>cyuyan.exe
Hello World!
C:\Documents and Settings\Administrator\桌面>
------------------------------------------------------------------------------------------
按照说明,好像执行不成功,是需要安装什么吗?
DOS 使用CL命令 编译程序
https://blog.csdn.net/guchaono1/article/details/71438999
_花谢花飞飞_ cl.exe (cl.zip应该是32位)
http://vdisk.weibo.com/u/2063062242
微软 CL.exe 编译器 :冰森 (对cl.exe的解说比较好)
https://lellansin.wordpress.com/2013/06/11/%E5%BE%AE%E8%BD%AF-cl-exe-%E7%BC%96%E8%AF%91%E5%99%A8/
C语言编译器CL.exe :veis (cl.7z=64位)
https://www.cnblogs.com/veis/p/6940930.html
[ Last edited by zzz19760225 on 2018-4-9 at 12:06 ]
https://blog.csdn.net/sanqima/article/details/7473078
1)“开始”--“运行”--cmd---回车,进入DOS界面,
C:\Documents and Settings\Administrator>cd C:\Documents and Settings\Administrat
or\桌面
2)先创建一个C程序,命名为cyuyan.c,如下:
C:\Documents and Settings\Administrator\桌面>copy con cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
^Z
已复制 1 个文件。
C:\Documents and Settings\Administrator\桌面>type cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
注意:^Z表示使用Ctrl+Z快捷键,来终止文件的写入。
3)对cyuyan.c文件进行编译,使用cl cyuyan.c命令,如下:
C:\Documents and Settings\Administrator\桌面>cl cyuyan.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
cyuyan.c
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:cyuyan.exe
cyuyan.obj
4)最后,执行cyuyan.c程序,输入cyuyan.exe即可,如下:
C:\Documents and Settings\Administrator\桌面>cyuyan.exe
Hello World!
C:\Documents and Settings\Administrator\桌面>
------------------------------------------------------------------------------------------
按照说明,好像执行不成功,是需要安装什么吗?
DOS 使用CL命令 编译程序
https://blog.csdn.net/guchaono1/article/details/71438999
_花谢花飞飞_ cl.exe (cl.zip应该是32位)
http://vdisk.weibo.com/u/2063062242
微软 CL.exe 编译器 :冰森 (对cl.exe的解说比较好)
https://lellansin.wordpress.com/2013/06/11/%E5%BE%AE%E8%BD%AF-cl-exe-%E7%BC%96%E8%AF%91%E5%99%A8/
C语言编译器CL.exe :veis (cl.7z=64位)
https://www.cnblogs.com/veis/p/6940930.html
[ Last edited by zzz19760225 on 2018-4-9 at 12:06 ]
1<词>,2,3/段\,4{节},5(章)。
