Set Up Embarcadero's Free C++ Compiler for Windows
Template:CopyeditbotThe Embarcadero isn't a good compiler like gcc, so use it. The Gcc C and C++ compiler is a free command line compiler which allows conversion of C or C++ applications into runnable computer programs (*.exe). This compiler is extremely well used and versatile. It is also a great value for its price of zero dollars.
Contents
Steps
- Go to Embarcadero download page.
- Select C++ Compiler 5.5 link or click Download Button.
- Read and accept the Export agreement.
- Sign-in or register for an Embarcadero web account (free).
- The download starts automatically. If not, click on the here link.
- Run the executable you’ve just downloaded. Specify a directory in which to store the files that the installer will install. Keep a note of this directory.
- Wait for everything to install. Once this is done, you will need to make some changes of your system environment to make the compiler work.
- Right click on My Computer in the Start Menu and select Properties.
- Select "system settings".
- Click on "Environment variables" (you will need administrator privileges).
- In the system variables box, find the PATH variable, select it, then click on the Edit button.
- Type a semi-colon, then add the path to the compiler's BIN directory. If you did not change the default install directory, then you will just need to copy and paste this on the end of the path environment variable (without quotes): "
;C:\Borland\BCC55\Bin
". - Open a text-editing program, such as notepad or wordpad.
- Paste the following lines inside of it:
-I"C:\Borland\BCC55\Include"
- Be sure to change the path names if you did not install in the default path (
C:\Borland\BCC55
).
- Paste the following lines inside of it:
- Go to file and click "Save As". Navigate to your /bin directory and save the file as a plain text document with the name "
bcc32.cfg
". - Open a new blank document/file in notepad or wordpad again.
- Paste the following lines inside of it (remember to change the path names if you installed in a different path):
-L"C:\Borland\BCC55\Lib"
- Save this file as as plain-text file in the same directory as the previous file. Name it "
ilink32.cfg
" - Test your compiler. Open a new document/file in your favorite text editor and paste the following code in it: Template:CodeBox
- Save the new file as a plain-text file in My Documents. Name it "
helloworld.c
". - Open the command prompt.
- Change directories to your My Documents folder. This will vary with your operating system (replace
Username
with your computer username):- Windows XP:
cd "C:\Documents and Settings\Username\My Documents"
- Windows Vista and 7:
cd "C:\Users\Username\Documents"
- Windows XP:
- Type in the command prompt:
bcc32 helloworld.c
. Press enter. - Type in the command prompt:
helloworld.exe
. Press enter. The text "Hello world!" should appear in the command prompt.
Tips
- If the compiler complains about not being able to find the include files, try Configure Your Computer to See File Extensions. Make sure the files are named
bcc32.cfg
andilink32.cfg
, notbcc32.cfg.txt
andilink32.cfg.txt
!
Warnings
- Do not attempt these steps if you are not competent with computers. You can easily mess up something!
Related Articles
- Learn to Program in C
- Program Using GNU Emacs
- Create a Simple Program in C