Thursday, July 30, 2009

I want to write a c program in notepad .how can i compile and execute it in dos prompt without using c editor?

we can write java programs in notepad and we use javac, java commands in dos prompt to compile and execute the program.in the same way what commands are used to do the c programming compiling and execution.

I want to write a c program in notepad .how can i compile and execute it in dos prompt without using c editor?
java source code needs java SDK to compile the source then you can use 'javac' command, it is same for c language, you need a compiler to compile the c program, the simplest compiler that i know is Minimalist GNU for windows, after you install and set path in environment variables to the installed folder/bin , you can use 'gcc' command to compile your program. You can download MinGW in http://sourceforge.net/project/showfiles...
Reply:microsoft has a free C++ compile that's called the "express edition".
Reply:It depends entirely on which compiler you're using, but you'll have to set up a make file that has a list of all the files you're compiling, a command that causes the compiler to be invoked for each one (along with which flags should be sent) and another command to the linker to bind them all together into an exe. Make files aren't trivial to write, so your compiler will come with a number of examples that you can modify. Integrated Development Environments (like Borland, Visual Studio etc) aren't just editors, they also automate the make process for you.





Here's some more information:
Reply:Well, Borland has the closest thing, but that is years ago and now backwards. You typically use "includes" and libraries. The 'editor' is not the key and just soemthing they throw in with all the rest of it. You use command line switches to do the compiling from basic source code.


No comments:

Post a Comment