Using Intel C++ Compiler 8.0 With Eclipse IDE On Linux
Using Intel C++ Compiler 8.0 With Eclipse IDE On Linux
2
A Simple HelloWorld* Program Figure 1. Eclipse Platform with CDT Plug-In Startup
Window
This section explains how to configure the Eclipse
IDE to use Intel C++ Compiler for building a simple
HelloWorld* program. Before starting Eclipse, make
sure that the appropriate environment variables are set
for the Eclipse IDE.
Example:
export PATH=${PATH}:/usr/local/j2sdk1.4.1_02/bin
export ANT_HOME=~/ant/
export JAVA_HOME=/usr/local/j2sdk1.4.1_02
Figure 1 displays a screen capture of the main Figure 2. Eclipse IDE C++ Development Perspective
workbench window that appears on your desktop when
you first start Eclipse with the CDT plug-ins installed.
The Navigator panel at the top left shows the files in
the user’s workspace. The Outline panel at the bottom
left shows a content outline of the file being edited. The
Tasks panel at the bottom right shows a list of to-dos.
The Welcome panel at the top right displays an editor
with the CDT.
3
Figure 4. HelloWorld Makefile The CDT build process executes the make command,
by default, to build projects. Therefore, you need
to create a Makefile to specify rules to build the
HelloWorld project. Figure 4 presents the Makefile for
the HelloWorld project.
4
Building a More Complex Figure 6. Importing Files Into a Project Through the
Import Feature of Eclipse IDE
Application from the
Eclipse IDE
MySQL is a representative, complex, open-source
application. It has a configure script to configure
the build for a particular platform and to generate
appropriate Makefiles using Makefile.in files.
5
Figure 9. Results from Building a Test Project Using Advanced Optimization
with Intel® C++ Compiler Using the Vectorization
Option, -axW
Options of Intel® Compilers
Intel C++ Compiler provides advanced optimization
options to improve application performance on the
latest Intel processors. Some of the optimization
options include:
• -ax{M|K|W|B|P}: This option enables the
vectorizer and generates specialized and generic
32-bit code. The generic code is usually slower
than the specialized code.
• -x{M|K|W|B|P}: This option turns on the vectorizer
and generates processor-specific, specialized
code.
• -ipo: This option enables interprocedural
optimizations.
Debugging Applications
This section explains how to debug an application with
gdb as supported in the Eclipse IDE. The example
assumes that vector.cpp is built with the –g option.
6
Conclusion Getting Started Guide for Intel C++ Compilers:
Windows:
There are many ways of integrating your C++ projects www.intel.com/software/products/compilers/
with the Eclipse IDE. This paper has presented one techtopics/gettingstarted.pdf
such approach with the help of the Intel C++ Compiler, Linux:
presented how to import projects, and provided an www.intel.com/software/products/compilers/
overview of how to build and debug projects. While this techtopics/C_Getting_Started_Guide1.htm
document focuses on the Intel C++ compiler, a similar
approach can be used with the Intel® Fortran Compiler. Intel C++ Compiler User’s Guide:
Windows:
Additional Information and www.intel.com/software/products/compilers/cwin/
docs/ccug.htm
Links Linux:
Support for Intel® Software Development Products, www.intel.com/software/products/compilers/clin/docs/
including Intel C++ Compiler 8.0: ug/index.htm
http://premier.intel.com
Optimizing Applications with Intel C++ and Fortran
Intel Software Development Products information, Compilers for Windows and Linux:
including purchase and availability information: www.intel.com/software/products/compilers/
www.intel.com/software/products techtopics/compiler_optimization.pdf
Release Notes for Intel C++ Compilers: Eclipse CDT (C++ development tools):
Windows: www.eclipse.org/cdt/
www.intel.com/software/products/compilers/cwin/
relnotes.pdf Eclipse Project Home Page:
Linux: www.eclipse.org/eclipse/index.html
www.intel.com/software/products/compilers/clin/
relnotes.pdf Eclipse Project FAQ:
www.eclipse.org/eclipse/faq/eclipse-faq.html
1
See www.intel.com/software/products/compilers
2
See www.eclipse.org
3
See www.eclipse.org/cdt
4
See www.eclipse.org/eclipse/index.html
5
See dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/user/faq.html?cvsroot=Tools_Project
6
See www.intel.com/software/products/compilers/techtopics/compiler_optimization.pdf
7
Intel Corporation
2200 Mission College Blvd.
Santa Clara, CA 95052-8119
USA
Intel, the Intel Logo, Itanium, Pentium, Intel Xeon, Intel XScale and VTune are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and
other countries.
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL 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. Intel products are not intended for use in medical, life saving, life sustaining applications. Intel may make changes
to specifications and product descriptions at any time, without notice.