Show: Delphi C++
Display Preferences

BCCOSX.EXE, the C++ Compiler for OS X

From RAD Studio
Jump to: navigation, search

Go Up to Command-Line Interfaces of C++ Compilers


BCCOSX.EXE is a command-line interface for BCCOSX, the C++ compiler for OS X.

BCCOSX.EXE Is Closely Related to BCC32.EXE

In general, using BCCOSX.EXE is identical to using BCC32.EXE, except for the following platform-specific command-line options for OS X:

The two compilers share one code base, so the command-line syntax for BCCOSX.EXE has only a few differences from the command-line syntax for BCC32.EXE.

Command-Line Syntax

bccosx [option [option...}] <filename> [<filename>...]

Use spaces to separate the command-line compiler name, each option, and the filenames. Precede each option by either a hyphen (-) or a forward slash (/). For example:

bccosx -Ic:\code\hfiles

You can also specify options in configuration (.CFG) files, which are described in a following section, BCCOSX.CFG File.

You can use BCCOSX.EXE to send .O files to XLINK. BCCOSX.EXE can also generate assembler code (see the -S option), but we do not supply an assembler for OS X.

See the BCCOSX.EXE Command-Line Help for Detailed Information

To display the BCCOSX.EXE command-line help in the cmd window, include the -h command-line option.

bccosx -h

Displaying Help for Specific Options, Groups such as -Axxx and -Vxxx

You can get more specific information about each of the multiletter options, such as -Axxx (language compatibility and standards compliance) and -Vxxx (backward compatibility).

To do this, use the -h command-line option with the initial letter of the option group (such as -A to specify the -Axxx options). BCC32.EXE will display only the help topics for the specified set of options (such as -Axxx, -Vxxx, or -Wxxx).

For example, to display a description of the -Axxx (language compatibility and standards compliance) options, use the -h and -A command-line options:

C:\>bccosx -h -A


Include Paths (-I, --sysinc)

BCCOSX.EXE resolves the include directives by searching the specified files in the standard include paths followed by the remote include paths.

Remote paths are relative to $(SYSROOT).

$(SYSROOT) is a Windows directory that represents the logical root of the OS X machine. In this location are copied (cached) header files and dynamic libraries necessary for compiling and linking (see PAClient.exe).

The include paths can be controlled with the following options:

Option

Include Path Type

Description

-I

standard

Sets the standard include file search path.

--sysinc

remote

Sets the system (remote) include file search path. $(SYSROOT) is prepended to the specified path.

Remote paths are processed after standard paths are processed.

BCCOSX.EXE assumes that include directives of the form #include </...> (angle brackets, paths begin with forward slash) refer to the $(SYSROOT) location.

The commonly used include paths are described in the following table:

Include Path Type

Path

Description

standard

$(BDS)\include\osx\crtl

This directory contains C/C++ RTL header files (.h) provided by RAD Studio. Some of these files include C/C++ header files from $(SYSROOT)\usr\include. For more information, see OS X C RTL.

$(BDS)\include\osx\rtl

This directory contains Delphi RTL machine generated header files (.hpp).

remote

$(SYSROOT)\usr\include

This directory contains C/C++ RTL OS X header files cached on Windows.

To set the include paths from RAD Studio, see C++ Compiler Directories and Conditionals (for standard include paths) and SDK Manager (for SDK include paths).

Library Paths (-L, --syslib)

Option

Include Path Type

Description

-L

standard

Library file search path.

--syslib

remote

Library file search path relative to $(SYSROOT).

Standard library paths and remote library paths are processed in the order specified. Thus you can control your library search path by interleaving -L and --syslib options to the compiler.

System Root (--sysroot)

SYSROOT is a directory on the Windows machine that represents the logical root of the remote/target machine. This directory is where files and/or symbolic information from the remote/target machine are cached. The SYSROOT value is used by BCCOSX.EXE to search for include and library files.

To change the SYSROOT value, use the --sysroot option and specify the directory on the development PC where you want the local cache copied.

To set the SYSROOT path from RAD Studio, see SDK Manager.

Target Options for Multi-Device Applications (--txxx)

BCCOSX.EXE supports the following compiler options for specifying the target of a compilation (the -txxx command-line options):

To display command-line help for the -txxx options, enter: > bccosx -h -t.

Option Description
  • -t

Specify target executable

  • -tC
  • -tCD
  • -tCDR
  • -tCDV
  • -tCR
  • -tCV
  • Console application is target
  • Console DLL is target
  • Console DLL that uses dynamic RTL is target
  • Console DLL that uses the VCL is target
  • Console application that uses the dynamic RTL is target
  • Console application that uses the VCL is target
  • -tD

DLL (shared library) is target (.dylib on OS X)

  • -tM on Posix
    (or -WM on Windows)

Multithreaded application is target

  • -tP

Package is target

Some of the -t options are not supported by BCC32.EXE for 32-bit Windows.

BCCOSX.CFG File

The configuration file for BCCOSX.EXE contains the following settings for the cross compiler:

-I"C:\Program Files (x86)\Embarcadero\Studio\18.0\include\osx";"C:\Program Files (x86)\Embarcadero\Studio\18.0\include\osx\crtl";"C:\Program Files (x86)\Embarcadero\Studio\18.0\include\osx\rtl"
-I"C:\Program Files (x86)\Embarcadero\Studio\18.0\dinkumware"
-L"C:\Program Files (x86)\Embarcadero\Studio\18.0\lib\osx32\release"
--syslib=/usr/lib
--sysinc=/usr/include
-F/System/Library/Frameworks

You can create your own BCCOSX.CFG file and use it for compiling. The custom BCCOSX.CFG file must be placed in the current directory from where BCCOSX.EXE is invoked.

See Also

Personal tools
In other languages
Previous Versions
Assistance