BCCOSX.EXE, the C++ Compiler for macOS
Go Up to Command-Line Interfaces of C++ Compilers
BCCOSX.EXE
is a command-line interface for BCCOSX, the C++ compiler for macOS.
Contents
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 macOS:
--framework
and-F
--sysinc
(include paths)--syslib
(library paths)--sysroot
(system root)-txxx
(target options)
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 macOS.
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 macOS 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 |
---|---|---|
|
standard |
Sets the standard include file search path. |
|
remote |
Sets the system (remote) include file search 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 |
|
This directory contains C/C++ RTL header files (.h) provided by RAD Studio. Some of these files include C/C++ header files from |
|
This directory contains Delphi RTL machine generated header files (.hpp). | |
remote |
|
This directory contains C/C++ RTL macOS 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 |
---|---|---|
|
standard |
Library file search path. |
|
remote |
Library file search path relative to |
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 |
---|---|
|
Specify target executable |
|
|
|
DLL (shared library) is target ( |
|
Multithreaded application is target |
|
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\19.0\include\osx";"C:\Program Files (x86)\Embarcadero\Studio\19.0\include\osx\crtl";"C:\Program Files (x86)\Embarcadero\Studio\19.0\include\osx\rtl"
-I"C:\Program Files (x86)\Embarcadero\Studio\19.0\dinkumware"
-L"C:\Program Files (x86)\Embarcadero\Studio\19.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
- BCCOSX
- XLINK.EXE, the OS X Linker
- OS X Application Development
- BCC32.EXE, the C++ 32-bit Command-Line Compiler
- BCC64.EXE, the C++ 64-bit Windows Compiler
- BCCIOSARM.EXE, the C++ Compiler for the 32-bit iOS Device
- BCCIOSARM64.EXE, the C++ Compiler for the 64-bit iOS Device
- BCCAARM.EXE, the C++ Compiler for Android
- Compiling and Linking an OS X C++ Console Application from Command Line
- "Hello World" OS X Console Application
- Multi-Device Applications Index
- OS X GNU Compiler Collection