Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在MS DOS上代替Borland手工编写c语言程序_C_Turbo C - Fatal编程技术网

如何在MS DOS上代替Borland手工编写c语言程序

如何在MS DOS上代替Borland手工编写c语言程序,c,turbo-c,C,Turbo C,我需要在MS DOS中编译一个程序。我有Borland编辑器,我可以使用Alt+F9编译它,但事情是它在后端所做的。我想在MS DOS中编译它。我试着这样做: c:\tc\bin>tcc -o hello.exe hello.c 其中hello.c是我的文件,hello.exe是我要生成的文件。没用了,我该怎么办?另外,请告诉我如何从MS DOS手动编译.cpp文件。如果我没记错的话,Borland/Turbo C编译器的命令行选项看起来不像gcc选项。您应该尝试使用tcc/?获取命令行

我需要在MS DOS中编译一个程序。我有Borland编辑器,我可以使用Alt+F9编译它,但事情是它在后端所做的。我想在MS DOS中编译它。我试着这样做:

c:\tc\bin>tcc -o hello.exe hello.c

其中
hello.c
是我的文件,
hello.exe
是我要生成的文件。没用了,我该怎么办?另外,请告诉我如何从MS DOS手动编译
.cpp
文件。

如果我没记错的话,Borland/Turbo C编译器的命令行选项看起来不像gcc选项。您应该尝试使用
tcc/?
获取命令行帮助。

我相信这一定能奏效

c:\tc\bin\tcc -c File.c   \\  To generate objective file
c:\tc\bin\tcc -o File.obj  \\ To generate exe from obj and please use .obj and not .o 
c:\tc\bin\ tcc -run File.c    \\ to generate exe file without .obj file
 c:\tc\bin\File.exe            \\ to run the exe file
我不知道为什么

tcc -o good.exe File.obj \\not working, the error is good.exe file not found
我想我们不能在tcc命令行提示符中为.exe文件命名,但在gcc中可能是这样的。我对TCC了解不多。如果我找到了,我会让你知道的

看看这些。这是我在谷歌上找到的。谷歌搜索让你更强大,所以当你不知道的时候,继续用谷歌搜索

谢谢

Turbo C++ 3版版权所有(C)1992 Borland国际 语法为:TCC[options]file[s]*=默认值-x-=关闭开关x -1 80186/286指令-2 80286保护模式指令。 -Ax禁用扩展-B通过程序集编译 -C允许嵌套注释-Dxxx定义宏 -Exxx备用汇编程序名称-G生成速度 -Ixxx包含文件目录-K默认字符未签名 -Lxxx库目录-M生成链接映射 -N检查堆栈溢出-O优化跳转 -PrimeC++编译-QXXX内存使用控制 -S生成汇编输出-TXX集合汇编程序选项 -Uxxx未定义宏-Vx虚拟表控件 -X禁止自动删除。输出-Yx覆盖控制 -Z抑制寄存器重新加载-生成字对齐 -b*将枚举视为整数-仅编译c -d合并重复字符串-exxx可执行文件名 -fxx浮点选项-gN在N个警告后停止 -在最大标识符长度中-N个错误后jN停止 -k标准堆栈帧-lx设置链接器选项 -mx设置内存模型-nxxx输出文件目录 -oxxx对象文件名-p Pascal调用 -r*寄存器变量-u*在外部加下划线 -v源代码级调试-wxxx警告控制 -y生产线编号信息-zxxx集合段名称 C:\TC\BIN> 因此,我认为您应该键入:


< C++ >代码> TCC您好。C程序和C代码>代码> TCC-P hello。CPP < /代码> C++程序。

< P>
tcc file.c
“它不工作”这是什么意思?你能告诉我们错误吗?@TokenMacGuy这是我得到的错误,hello.exe文件找不到,他可能面临同样的问题!您也可以通过以下页面获得帮助:@Amigable Clark Kant他想要tcc命令行选项!而不是使用gcc命令的Turbo!对不起,我赶时间。user672560询问了1990年左右ca推出的用于DOS的Borlands Turbo C编译器。你给了Fabrice Bellards TCC的链接。不幸的是,可执行文件的名称是相同的,但编译器却大不相同 Turbo C++ Version 3.00 Copyright (c) 1992 Borland International Syntax is: TCC [ options ] file[s] * = default; -x- = turn switch x off -1 80186/286 Instructions -2 80286 Protected Mode Inst. -Ax Disable extensions -B Compile via assembly -C Allow nested comments -Dxxx Define macro -Exxx Alternate Assembler name -G Generate for speed -Ixxx Include files directory -K Default char is unsigned -Lxxx Libraries directory -M Generate link map -N Check stack overflow -O Optimize jumps -P Force C++ compile -Qxxx Memory usage control -S Produce assembly output -Txxx Set assembler option -Uxxx Undefine macro -Vx Virtual table control -X Suppress autodep. output -Yx Overlay control -Z Suppress register reloads -a Generate word alignment -b * Treat enums as integers -c Compile only -d Merge duplicate strings -exxx Executable file name -fxx Floating point options -gN Stop after N warnings -iN Max. identifier length -jN Stop after N errors -k Standard stack frame -lx Set linker option -mx Set Memory Model -nxxx Output file directory -oxxx Object file name -p Pascal calls -r * Register variables -u * Underscores on externs -v Source level debugging -wxxx Warning control -y Produce line number info -zxxx Set segment names C:\TC\BIN>
#include <stdio.h>
#include <stdlib.h>
void main() {int *x=malloc(4);}
#include <stdio.h>
void main() {
 int a=9;
 int& b=a;
 printf("b=%d",b);
}