Getting Started with the Intel(R) C++ Compiler Professional Edition for Mac OS* X
Document number: 308949-005US
The Intel(R) C++ Compiler 11.0 compiles C and C++ source files on Mac OS* X
operating systems. The compiler is supported on IA-32 and Intel(R) 64
architectures.
You can run use with the Intel C++ Compiler in the Xcode* integrated development
environment or from the command line.
Use the Compiler in Xcode*
You must first create or choose an existing C or C++ Xcode* project. These
instructions assume you are creating a new project.
- Launch the Xcode application, which is typically found in the
Developer > Applications folder.
- Choose New Project from the File menu. When the New
Project Assistant window appears, select Command Line Utility and
then choose a template, like Standard Tool.
- Click Choose, then name your project and specify an alternate
directory, if necessary.
- Click Save. (This creates the named project directory, with an .xcodeproj
extension. Your new project directory contains a main.c source file, as well
as other project files.)
- Locate and double-click the target you want to change in the Groups &
Files list under the Target group.
- In the Target Info window, click Rules.
- To add a new rule, click the + button at the bottom, left-hand corner of
the Target Info window.
- From the new Rule section, under Process, choose C++ source
files, and under Using, choose Intel(R) C++ Compiler.
See the Building Applications with Xcode* section in the compiler
documentation for more information about using the compiler with the Xcode
integrated development environment.
Start the Compiler from the Command Line
Start using the compiler by performing the following steps:
- Open a command prompt.
- Set the environment variables for the compiler.
- Invoke the compiler.
One way to set the environment variables prior to invoking the compiler is to
"source" the compiler environment script, iccvars.sh
(or iccvars.csh):
source <install-dir>/bin/iccvars.sh
<arg>
where <install-dir> is the directory structure
containing the compiler /bin directory, and
<arg> is the architecture argument listed below.
The environment script takes an argument based on architecture; valid
arguments are as follows:
- ia32: Compilers and libraries for IA-32
architectures only.
- intel64: Compilers and libraries for Intel(R)
64 architectures only.
To compile a C language source file (for example,
my_source_file.c), use the following command:
icc my_source_file.c
To compile C++ source files, use this command:
icpc my_source_file.cpp
Following successful compilation, an executable named
a.out is created in the current directory.
Using Intel(R) Performance Libraries
The Intel(R) C++ Compiler includes the following performance libraries. Refer
to the appropriate sections of the documentation listed for information about
using these libraries.
|
Performance Libraries |
See the... |
| Intel(R)
Threading Building Blocks |
Intel(R) Threading Building Blocks Getting Started Guide
included with the Intel(R) Threading Building Blocks documentation. |
| Intel(R) Integrated Performance Primitives |
Installation Guide included with the Intel(R) Integrated Performance
Primitives documentation. |
| Intel(R) Math Kernel Library |
Intel(R) Math Kernel Library User's Guide included with the Intel(R)
Math Kernel Library documentation. |
Locate the Documentation
The documentation is located in the directories under the
<install-dir>/Documentation/ directory. If you installed all of the
appropriate components, you can find documentation on the following:
The Release Notes contain information on installing the Intel(R) C++
Compiler.
The Intel(R) C++ User and Reference Guides documentation is available
as an Apple Developer Documentation documentation set.
In addition to the documentation listed above, some of these components
include documentation in the form of man pages.
Note: If you selected to not install a component, the associated
documentation is not installed.
Product Information and Technical Support
For general product information or information on support for Intel software
products, visit the Intel web site:
http://developer.intel.com/software/products/. At this site, you will find
comprehensive product information, including:
- Links to each product, where you will find technical
information such as white papers and articles
- Links to user forums
- Links to news and events
To find technical support information, to register your product, or to
contact Intel, please visit:
http://www.intel.com/software/products/support. For additional information,
see the Technical Support section of your Release Notes.
See the registration web site for licensing and registration guidance:
https://registrationcenter.intel.com/.
Disclaimer and Legal Information
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL(R) PRODUCTS.
NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL
PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS
AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER,
AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE
OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A
PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR
OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL,
THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE
FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR
DEATH MAY OCCUR.
Intel may make changes to specifications and product descriptions at any time,
without notice. Designers must not rely on the absence or characteristics of any
features or instructions marked "reserved" or "undefined." Intel reserves these for
future definition and shall have no responsibility whatsoever for conflicts or
incompatibilities arising from future changes to them. The information here is
subject to change without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known
as errata which may cause the product to deviate from published specifications.
Current characterized errata are available on request.
Contact your local Intel sales office or your distributor to obtain the latest
specifications and before placing your product order.
Copies of documents which have an order number and are referenced in this document,
or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting
Intel's Web Site.
Intel processor numbers are not a measure of performance. Processor numbers
differentiate features within each processor family, not across different processor
families. See http://www.intel.com/products/processor_number for details.
BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Atom, Centrino Atom
Inside, Centrino Inside, Centrino logo, Core Inside, FlashFile, i960, InstantIP,
Intel, Intel logo, Intel386, Intel486, IntelDX2, IntelDX4, IntelSX2, Intel Atom,
Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap
ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel
NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv,
Intel vPro, Intel XScale, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive,
PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, Viiv
Inside, vPro Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel
Corporation in the U.S. and other countries.
* Other names and brands may be claimed as the property of others.
Copyright (C) 1996 - 2008, Intel Corporation. All rights reserved.