C++ Free Compiler

From RAD Studio
Jump to: navigation, search

Introduction

The Embarcadero C++ Compiler is a free, Clang-based compiler for 32-bit Windows only. The download includes a number of other tools, as well as Dinkumware STL, headers, and import libraries required to build both command-line and GUI Windows applications.

C++ Compiler does not include a text editor. Use your preferred text editor to write your code, save the file as filename.cpp, and use the command-line tools from the command prompt to compile your source code and create an executable file. E.g., bcc32c filename.cpp. The first argument is the name of the compiler tool and the second argument contains the C++ source file.

Set up

Follow the instructions below to set up the C++ Free Compiler:

Extracting the zip file

Unzip the downloaded file to any location. For example, it could be unzipped to c:\BCC101\.

Configuring the System Path

To use the Compiler, the path to the Compiler folder must be included in your System Path. To do so, follow the instructions below:

Windows 7

  1. Open a Windows Explorer window, right-click the Computer option on the sidebar and choose Properties.
  2. Click Advanced system settings in the left-side pane.
  3. Click the Advanced tab.
  4. Click Environment Variables....
  5. Highlight Path from the list of System variables and click Edit...
  6. Add the path to the \bin folder: ;c:\BCC101\BIN; (or your extracted folder) in the Variable value: text field.
    Note: Be careful not to delete any of the existing text in the value.
  7. To finish, click OK in the Edit System Variables window, the Environment Variables window, and the System Properties window.

Windows 10

  1. Open a Windows Explorer window, right-click the This PC option on the sidebar and choose Properties.
  2. Click Advanced system settings in the left-side pane.
  3. Click the Advanced tab.
  4. Click Environment Variables....
  5. Highlight Path from the list of System variables and click Edit...
  6. Click New and enter the path to the \bin folder: c:\BCC101\bin (or your extracted folder) in the text field that appears below the other items in the list.
  7. To finish, click OK in the Edit environment variable window, the Environment Variables window, and the System Properties window.

Included Tools

The Compiler includes a set of command-line tools, as well as RTL dynamic libraries. All available tools are stored in the \bin folder and must be run from the command prompt.

BCC32C

This is the compiler itself. Type -h to see all options.

The compiler uses a configuration file (bcc32c.cfg), included in the download, with default values that should work on your system.

CPP32C

This is a C++ preprocessor. It allows you to see the initial operations performed on C or C++ files before they are compiled, i.e., expansion of #includes and processing of #defines.

GREP

A tool for searching text files (such as source code) for matching strings.

ILINK32

The linker, which combines compiler-output object files into an executable file. It is normally invoked by the compiler.

IMPLIB

This takes either a DLL or a module definition file as input, and creates an import library (.lib). For more information, see Linking DLLs (C++).

MAKE

A tool used to run commands based on file dependencies, usually used to help compile a project of many source files.

TDUMP

Displays a large amount of information about the structure of a .exe, .lib or .obj file, including debug information, exports, and more.

TLIB

Manages libraries (.lib files) created from several object files (.obj) You can create a library from several .obj files, add, remove, or replace .obj files.

TOUCH

Sets the last-modified date and time of one or more files to the current time or a specified time.

See Also