Set Up Embarcadero's Free C++ Compiler for Windows

The 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.

Steps

  1. Go to Embarcadero download page.
  2. Select C++ Compiler 5.5 link or click Download Button.
  3. Read and accept the Export agreement.
  4. Sign-in or register for an Embarcadero web account (free).
  5. The download starts automatically. If not, click on the here link.
  6. 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.
  7. 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.
  8. Right click on My Computer in the Start Menu and select Properties.
    1. Select "system settings".
  9. Click on "Environment variables" (you will need administrator privileges).
  10. In the system variables box, find the PATH variable, select it, then click on the Edit button.
  11. 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".
  12. Open a text-editing program, such as notepad or wordpad.
    1. Paste the following lines inside of it:-I"C:\Borland\BCC55\Include"
    -L"C:\Borland\BCC55\Lib"
    • Be sure to change the path names if you did not install in the default path (C:\Borland\BCC55).
  13. 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".
  14. Open a new blank document/file in notepad or wordpad again.
  15. 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"
  16. Save this file as as plain-text file in the same directory as the previous file. Name it "ilink32.cfg"
  17. Test your compiler. Open a new document/file in your favorite text editor and paste the following code in it:
  18. Save the new file as a plain-text file in My Documents. Name it "helloworld.c".
  19. Open the command prompt.
  20. 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"
  21. Type in the command prompt: bcc32 helloworld.c. Press enter.
  22. 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 and ilink32.cfg, not bcc32.cfg.txt and ilink32.cfg.txt!

Warnings

  • Do not attempt these steps if you are not competent with computers. You can easily mess up something!

Related Articles