Using Intel® C++ Compiler for MeeGo* Application Development
Introduction
This article explains how to use the Intel® C++ Compiler in the Intel AppUp™ SDK Suite for MeeGo* to build applications for deployment on a MeeGo device. The instructions in this article are for deploying an application on a MeeGo Tablet device but they equally apply to a Netbook and Handset device.
1. MeeGo* SDK 1.2 or higher: http://appdeveloper.intel.com/en-us/article/building-meego-application-appup-using-windows-development-environment
2. Intel AppUp™ SDK Suite 1.2 or higher for MeeGo*: http://appdeveloper.intel.com/en-us/meego-sdk-suite .
Installation
The Intel AppUp SDK Suite for MeeGo integrates into Qt Creator*, and provides compilers, debugger and high performance libraries for developing 32-bit applications for the MeeGo operating system. The installation order is:
1. Install the MeeGo SDK by following the instructions at http://appdeveloper.intel.com/en-us/article/installing-meego-sdk-windows . The setup program will automatically add the the MeeGo handset and MeeGo Netbook targets for you, and also install the mad-developer component.
2. Install the Intel® C++ Compiler for MeeGo. Refer to instructions at http://appdeveloper.intel.com/en-us/articles/intel-c-compiler-meego-windows-cross-release-notes .
There are two Intel C++ compilers for Windows-host development, a Windows* hosted cross compiler for MeeGo target, and a Windows-hosted native compiler for use with the Nokia* Qt* Simulator. The focus of this article is on the Windows* cross compiler for MeeGo application development.
Preparing and Testing the MeeGo Device
In this step we will configure the MeeGo Device so it can communicate with the host system running Qt Creator. We can then build, deploy, and run the application on the device after the device has been properly configured. After installing the compiler, click “MeeGo QtCreator” from the Intel AppUp™ SDK Suite for MeeGo menu in the Start menu:

NOTE: If you invoke Qt Creator* from the MeeGoSDK folder in the Start menu and try to build a project with Intel® C++ Compiler you will get the following build error:
Make: icpc: Command not found
The reason is that the Intel Compiler build environments are not set up properly. Running “MeeGo QtCreator” from the Intel Compiler folder in the Start menu sets up the compiler environment variables before invoking Qt Creator. You can also manually achieve the same thing by performing the following steps:
1. Click “Command Prompt-ICC Cross to MeeGo”
2. C:\MeeGoSDK_1.2\QtCreator\bin\qtcreator.exe
After step 1 above you can also build using the Intel® C++ Compiler from the command prompt.
On the MeeGo device:
1. Open a terminal window and enter “ifconfig” to get the IP address of the machine
2. Enter “xhost +” so clients can connect to the MeeGo device
In Qt Creator:
1. Click “Tools\Options\Projects” and then click “MeeGo Device Configurations”

Click “Add” to get “New Device Configuration 1” that we are going to configure for our project.

Select “Remote device”, enter “root” for username and enter the password , and the IP address for the MeeGo device.
3. Click “Test” to test connection between the host system and the MeeGo device:

Using the Intel C++ Compiler in Qt Creator*
For the purpose of this article we will build and deploy a simple Hello application that displays a Hello message on the MeeGo device. The application source files and resources are provided in HelloMeeGo.zip.
In Qt Creator:
1. Open HelloMeeGo.pro project file provided, select “meego-tablet-ia32” target as shown, and click “Finish”:

2. Click the “Projects” icon on the left, and select “meego-tablet-ia32” from the “Qt version” pull down menu:

Click “Details” under “Build Steps” and enter “-spec linux-icc-v12” :

Click “Details” again to save the options:
Click “Run” and select “New Device Configuration 1” from the “Device configuration” pull-down as shown:
3. Click “Build\Rebuild All” to build the application and package for deployment on the target. Look at the “Compile Output” log to ensure the project built successfully. You should see references to “icpc” in the “Compile Output” window that indicates the Intel® C++ Compiler is used to build the project.
Click “Build\Run” to run the program on the MeeGo device. The following messages will appear in the “Application Output” window and the message “Hello MeeGo !” will display on the MeeGo device:

Using the Intel® C++ Compiler from a Command Prompt
Click “Command Prompt-ICC Cross to MeeGo” to get a command prompt:

You can then build the Hello project from the command prompt by running nmake:
NOTE: You will need the file “ui_mainwindow.h” (created by the Qt Creator* IDE after a Build/Rebuild) in the project directory to avoid compiler error about missing .h file:

Changing Compiler Options and Build Parameters
The following methods are specific to Qt Creator* and apply to all Compilers not just Intel® Compilers.
1. Project Specific Options
Edit the project file “.pro” and add the compiler options needed for your project:
- .C Compile Options:
QMAKE_CFLAGS += -O3 –xSSE3_ATOM
- .CPP Compile Options:
QMAKE_CXXFLAGS += -O3 -std=c++0x –xSSE3_ATOM
- Predefined Macros
DEFINES = MY-DEF1 MY-DEF2
2. Global Options
To set default compiler options that apply to all existing and new projects, modify the options in the qmake.conf files in the following directories:
C:\MeeGoSDK_1.2\MADDE\sysroots\meego-core-ia32-madde-sysroot-1.2.0.0.0.20110516.6-fs\usr\share\qt4\mkspecs\linux-icc-v12
C:\MeeGoSDK_1.2\MADDE\sysroots\meego-core-ia32-madde-sysroot-1.2.0.0.0.20110516.6-fs\usr\share\qt4\mkspecs\win32-msvc2008
C:\MeeGoSDK_1.2\MADDE\sysroots\meego-core-ia32-madde-sysroot-1.2.0.0.0.20110516.6-fs\usr\share\qt4\mkspecs\win32-msvc2010
3. Deployment Options
To deploy an application on the target device your project file (.pro) needs to have the following entries:
TARGET = [your project name]
Target.path = /usr/local/bin
INSTALLS = target
For information on how to set other qmake variables please refer to the qmake Variable Reference at http://doc.qt.nokia.com/latest/qmake-variable-reference.html#libs
Tuning for Performance on Intel® Atom™ Processors
Use the “–xSSE3_ATOM –minstruction=movbe” Compiler options to generate optimized code for Intel® Atom™ processor. The above option generates code that takes advantage of the MOVBE instruction that is supported on Intel Atom processors. Using the option “-xSSE3_ATOM” the compiler optimizes code for the Intel Atom processor, but it does not generate the MOVBE instruction (e.g. –minstruction=nomovbe is the default) thus allowing the executable to run on Intel non-Atom and non-Intel processors that support Intel® SSSE3.
Additional Resources
Intel® C++ Compiler Users Guide
Developing MeeGo* Applications on Windows*
AppUp(SM) Developer Program User Forum
| Optimization Notice |
|---|
|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 |
Prerequisite
