Discussion in 'QnA (read only)' started by saro_gn, Dec 1, 2005.
pls anybody give me the solution.
how to compile or execute 'c' program without editor.
i dont think its possible wihout the editor,u need to have a compiler..
but if u have executed the program once, then an exe file is created in c:\TC\Bin by the name of urprogramname.exe u can use this, if u were asking something like this..
wel the editor is a part of the compiler which eventually gives u the .exe file
so u cant break the sequence
once u have the .exe file then u can execute an per ur will !!
First tell..why do u want to compile/execute c program without editor??
As per my knowledge ...Which never happens...without complier..
Editor is a different thing and compiler is different.
Some vendors gives a common solution called IDE or Integrated Development Environment.
TC.exe is an IDE.
Notepad is Editor.
Tcc.exe is compiler.
To write a code, you need an editor while to compile it you will need a compiler.
As aadipa said, editor is not a part of the compiler & you will not need it to compile & execute programs.
I am not sure if the Tcc.exe has any command line switches to input the file name.
If you are on Linux, you will not need an editor if you already have the ".c" file. You can use the "cc" or "gcc" command from the console to compile the programe.
A ".out" file is generated in the same directory which is the executable programe.
What an interesting question !!!!
First of all, it is absolutely possible to compile or execute 'c' program without editor.
To compile a 'c' program, all u need is a 'c' compiler; to execute a 'c' program, well... compiled program that is...u don't need anything, I mean, only the OS is enough!!! All u need to do is run the executable. And yes, u can't execute a 'c' code (uncomplied, that is), but I am sure u already know that!!!
U need an editor (text editor, that is) for writing the 'c' code into the file, u can even do that (with much pain, of course, but can do it nonetheless) with 'copy con' command (in MS-DOS, or Dos Box). But, for compiling of excuting, I am sure u don't need any 'editor' or anything like that.
if you are using Turbo C, open a command window (DOS box), go to the folder where your 'c' program is, and then type "tcc program.c" or "tcc.program.cpp". it will compile and linkup and will show any errors or warnings. but you must have the tc/bin directory in your path. otherwise copy your program file into the bin directory and then compile. once compiled, you can run your program just by typing its name because its an executable now. hope this helps.
Separate names with a comma.