Methods for compiling c programs

Methods for compiling c programs

How to Compile C Programs

Before moving further, kindly go through this article. Later you will find few articles which are based on this application.
1. Download Borland *++ compiler 5.5 (for Windows) from the given link.
http://goo.gl/cUXYHp
Or
http://goo.gl/0WWjL1

2. After you download, run the file C++5.51.exe. The default installation path would be:
C:\Borland\BCC55
How to configure Borland C++ compiler?
1. After the installation of Borland C++ compiler is complete, create two new Text Documents.

2. Open the first New Text Document.txt file and copy the following lines:
-I”c:\Borland\Bcc55\include”
-L”c:\Borland\Bcc55\lib”
Save changes and close the file.
Now rename the file from New Text Document.txt to bcc32.cfg

3. Open the second New Text Document (2).txt file and copy the following line:
-L”c:\Borland\Bcc55\lib”
Save changes and close the file.
Rename the file from New Text Document (2).txt to ilink32.cfg

4. Now copy the two files bcc32.cfg and ilink32.cfg, navigate to C:\Borland\BCC55\Bin and paste them.

How to Compile the C Source Code (.C files)?
1. You need to place the .C (example.c) file to be compiled in the following location:
C:\Borland\BCC55\Bin

2. Now go to command prompt (Start->Run->type cmd->Enter)
Use the command:
C:\Borland\BCC55\Bin

3. To compile the file (example.c), use the command:
bcc32 example.c

4. If there are no errors in the source code, you’ll get a compiled executable module (example.exe) in the same location (C:\Borland\BCC55\Bin).
Finally, you have successfully compiled the source code into an executable file (.exe file).