# Building the Target

A single project can contain multiple targets. The active target determines how your project is built. This topic describes how to build the target using the Xcode* IDE and documents the build steps using the xcodebuild command line utility.

### Note

Starting with the 19.0 release of the Intel® C++ Compiler Classic, macOS* 32-bit applications are no longer supported. If you want to compile 32-bit applications, you must use an earlier version of the compiler and you must use Xcode 9.4 or earlier.

## Building Using the Xcode IDE

1. Select the target in the project editor under Targets.
2. Select Product > Build.
3. To view the results of your build, click the Log Navigator button.

You can change the compilation order of the files in an Xcode target. To re-order the files listed under a target's Compile Sources, click a source file and drag it before, or after other compilations.

## Building From the Command Line Using the xcodebuild Utility

You can use the `xcodebuild` utility to build a target. This utility uses the Xcode project settings to build target projects from the command line. If you have previously configured your Xcode project to build with the Intel compiler, `xcodebuild` invokes it from the command line.

To build from the command line:

1. Check that the Xcode project is configured to use the Intel® C++ Compiler Classic.
2. Launch a terminal window from the finder by selecting Applications > Utilities > Terminal .
3. Change directories to the directory containing the Xcode project file (.xcodeproj).
4. If you have multiple versions of Xcode, use the xcode-select utility to verify the current Xcode version.
5. Issue an xcodebuild command. For example:

       xcodebuild -project HelloWorld.xcodeproj -target HelloWorld -configuration Debug

6. Run the program built in the example from the previous step by entering the following:

       ./build/Debug/HelloWorld

For more information, refer to the xcodebuild man page.

## Setting the Executable's Architecture

Before building a 64-bit executable from within Xcode, you may need to edit the executable's target architecture. To change the Architectures setting:

1. Click the target you want to change in the project editor under Targets and select the Build Settings tab.
2. Under Architectures, select the desired architecture.

### Note

The Intel® C++ Compiler Classic generates code solely for Intel® architectures.
Parent topic: Using Xcode* (macOS*)