Writing and running a C program under DOS :sanqima
https://blog.csdn.net/sanqima/article/details/7473078
1) "Start" -- "Run" -- cmd -- Enter, enter the DOS interface,
C:\Documents and Settings\Administrator>cd C:\Documents and Settings\Administrat
or\Desktop
2) First create a C program, named cyuyan.c, as follows:
C:\Documents and Settings\Administrator\Desktop>copy con cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
^Z
1 file(s) copied.
C:\Documents and Settings\Administrator\Desktop>type cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
Note: ^Z means using the Ctrl+Z shortcut key to terminate the writing of the file.
3) Compile the cyuyan.c file, use the cl cyuyan.c command, as follows:
C:\Documents and Settings\Administrator\Desktop>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) Finally, execute the cyuyan.c program, enter cyuyan.exe, as follows:
C:\Documents and Settings\Administrator\Desktop>cyuyan.exe
Hello World!
C:\Documents and Settings\Administrator\Desktop>
------------------------------------------------------------------------------------------
According to the instructions, it seems that it didn't execute successfully. Do you need to install something?
Compiling programs using the CL command in DOS
https://blog.csdn.net/guchaono1/article/details/71438999
_花谢花飞飞_ cl.exe (cl.zip should be 32-bit)
http://vdisk.weibo.com/u/2063062242
Microsoft CL.exe Compiler :Bingsen (The explanation of cl.exe is relatively good)
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 Language Compiler CL.exe :veis (cl.7z=64-bit)
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) "Start" -- "Run" -- cmd -- Enter, enter the DOS interface,
C:\Documents and Settings\Administrator>cd C:\Documents and Settings\Administrat
or\Desktop
2) First create a C program, named cyuyan.c, as follows:
C:\Documents and Settings\Administrator\Desktop>copy con cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
^Z
1 file(s) copied.
C:\Documents and Settings\Administrator\Desktop>type cyuyan.c
#include<stdio.c>
void main()
{
printf("Hello World!");
}
Note: ^Z means using the Ctrl+Z shortcut key to terminate the writing of the file.
3) Compile the cyuyan.c file, use the cl cyuyan.c command, as follows:
C:\Documents and Settings\Administrator\Desktop>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) Finally, execute the cyuyan.c program, enter cyuyan.exe, as follows:
C:\Documents and Settings\Administrator\Desktop>cyuyan.exe
Hello World!
C:\Documents and Settings\Administrator\Desktop>
------------------------------------------------------------------------------------------
According to the instructions, it seems that it didn't execute successfully. Do you need to install something?
Compiling programs using the CL command in DOS
https://blog.csdn.net/guchaono1/article/details/71438999
_花谢花飞飞_ cl.exe (cl.zip should be 32-bit)
http://vdisk.weibo.com/u/2063062242
Microsoft CL.exe Compiler :Bingsen (The explanation of cl.exe is relatively good)
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 Language Compiler CL.exe :veis (cl.7z=64-bit)
https://www.cnblogs.com/veis/p/6940930.html
[ Last edited by zzz19760225 on 2018-4-9 at 12:06 ]
1<词>,2,3/段\,4{节},5(章)。
