This topic applies to Eclipse* for C/C++.
You can automatically integrate the Intel® C++ Compiler that is part of the Intel® Integrated Native Developer Experience (Intel® INDE) into a preexisting Eclipse* CDT installation. If you have already installed the Intel® Integrated Native Developer Experience (Intel® INDE) product you can install and integrate the Eclipse components separately using Eclipse Help > Install New Software menu item. You can also install Eclipse and integrate its components using the modify feature of the Intel® Integrated Native Developer Experience (Intel® INDE) product installer.
For more information on using Eclipse with the Intel® C++ Compiler refer to the User and Reference Guide for Intel® C++ Compiler > Getting Started > Using Eclipse* in this documentation. For information on which versions of Eclipse are supported refer to the Release Notes supplied with the product.
There are two approaches to building applications with Eclipse* IDE:
Using environment files and the -platform compiler option.
Using Android* Native Developer Kit plugin.
This topic guides you through the process of editing the cross-compiling environment files, creating a new file, and selecting an environment file from within the Eclipse* IDE. After selecting the appropriate environment file for your project, you can proceed to build your application in the Eclipse IDE.
About Environment Files and -platform Compiler Option
Intel® C++ Compiler provides cross compilation support with environment files. After installing the Intel® Integrated Native Developer Experience (Intel® INDE) product, you can locate several *.env files in the product installation /bin/ia32 or /bin/intel64 folder. You use these *.env files together with the -platform compiler option to compile your application for a specific target operation system. The table below summarizes the target OS environment variables and the corresponding values that you can use with the -platform compiler option.
Editing/Creating Compiler Cross-Build Environment File
When you launch the Eclipse IDE, the environment file support appears under Intel® INDE > Environment File on the menu bar.
If you have selected a project in the Project Explorer, you will see Edit File for <project name>, Create New and Select File for <project name> menus.
You can select Intel® INDE > Environment File > Edit File for <project name>, to edit the environment file associated with the project. If no project is set, an error message box will appear asking to select a file first.
If you have not selected any project, you will only see Create New and Edit File menus.
Editing an Existing Environment File
Follow these steps to edit any existing environment file without selecting a project:
Select Intel® INDE > Environment File > Edit File. The Select a File to Edit dialog appears. In the screen shot below the selected android.env file represents the environment file to build applications for the Android* target platform.
In the Select a File to Edit dialog, select the appropriate environment file and click OK. The Editing <path>/*.env dialog opens. You can modify all the variable values that are listed in the dialog.
- For instance, in the Editing <path>/*.env dialog, select *platform and click Edit (this button gets highlighted when you select any row). The Modify A Variable dialog opens.
Modify the variable value in the Value field and click OK to save your change.
In the Editing <path>/*.env dialog, click Add to add a new variable::value pair to an existing env file. The Add a New Variable appears.
Add the new variable::value pair and click OK to save your changes to the *.env file.
To remove a variable::value pair, select a row and click Remove. A confirmation dialog appears. Click OK to save your change.
When you are done with all the editing (modifying/adding/removing), select OK in the Editing <path>/*.env dialog to close it.
Select this modified environment file before building your application. See Eclipse* IDE: Using Compiler Cross-Build Environment File
Creating a New Environment File
Follow these steps to create a new environment file:
Select Intel Tools > Intel® INDE Tools Environment File > Create New. The Create a new env file dialog opens.
Click on each row to add values for the variables. For instance, in the screenshot above, you can click on the *platform variable. The Modify a Variable dialog opens.
Add your value for the variable in the Value field. Click OK to save your input.
- The values specified in that file are now propagated to the value fields in your env file.
Select Apply to All… or Do Not Apply to control where this environment file should be used.
Note
These options are enabled only if a project has been selected in Project Explorer.
Select Save As to select a file name and save the file.
Select this environment file for your project before building your application.
Follow these steps to select an existing environment file to be used with the active configuration of a current project:
Select Intel Tools > Intel® INDE Tools Environment File > Select File for <project name>. The Select an Environment File dialog opens.
Use Browse to locate the appropriate environment file.
Select Apply to All Configurations if you want to use the file for all configurations in the current project.
Click OK to close the dialog.
Build the project. Right-click on project name and select Build Project.
Test your application.