Running an App in Qt* Simulator of Visual Studio 2008 using Intel® C++ Compiler for MeeGo*

Table of Content:

  1. Overview 
  2. Required Software 
  3. Release Notes of Intel C++ Compiler for MeeGo (local) v12.0 
  4. Getting Started 
    1. How to Start QtCreator* to target Simulator-MSVC2008 
    2. How to Start QtCreator* to target Simulator-MSVC2008 and use Intel C++ Compiler for MeeGo (local)
    3. Creating a New Qt Project “hello_world” 
    4. Building hello_world.pro with Default Compiler Visual Studio 2008* 
    5. Building hello_world.pro with Intel C++ Compiler 
    6. Applying or Changing Compiler or Link Options 
    7. Running hello_world.pro in Simulator-MSVC2008 
  5. Optimization Notice 
  6. 

 Overview

This article is intended for developers who develop or port applications on a Windows* system for a tablet device with MeeGo* operating system but without the actual physical tablet device. It describes the required software tools and steps for building and running the application with Qt* Simulator for Visual Studio 2008*.

Required Software

Operating system: refer to System Requirements in the Release Notes.

The following software tools are required on a Windows development system.

  1. Microsoft* Visual Studio 2008* express edition or above
  2. MeeGo SDK 1.2 for Windows: available at home page; this version of MeeGo SDK contains the Qt Simulator for Visual Studio 2008 as well as Qt Simulator for MinGW*.
  3. Intel® C++ Compiler for MeeGo (local) v12.0: click here to download
    Note: The Intel C++ Compiler for MeeGo (local) v12.0 should be installed after installed the MeeGo SDK for Windows so the environment will be setup correctly. 
      Please check the known issues and limitations of MeeGo SDK 1.2.

Release Notes of Intel C++ Compiler for MeeGo (local) v12.0

Click the latest Release Notes for Intel C++ Compiler for MeeGo (local) v12.0 to view the ReleaseNotes.

Getting Started

How to Start QtCreator* to target Simulator-MSVC2008

If you only want to use the Visual C++ compiler, simply launch the Qt Creator from Start > All Programs > MeeGo SDK 1.2  > Qt Creator

 QtCreator of MeeGo SDK

Qt Creator can find and set the Visual Studio 2008's bin, include and library directories automatically for the project. No additional steps are needed. 

Next go to section - Creating a New Qt Project “hello_world” to continue.

How to Start QtCreator* to target Simulator-MSVC2008 and use Intel C++ Compiler for MeeGo (local)
Intel C++ compiler for MeeGo (local) offers industry-leading C/C++ compiler and performance libraries, but it does not provide a full set of C/C++ header files and libraries. Instead it depends on the Visual C++ 2008's header files, libraries, and the link.exe. To use the Intel C++ compiler for MeeGo, you need to set up the environment so the Intel C++ compiler's bin, include and library directories can be found. 

To set up the environment of Intel C++ Compiler for MeeGo, launch the command prompt from  Start > All Programs > Intel AppUp™ SDK Suite for MeeGo > Intel® C++ Compiler for MeeGo (local) v12.0 > Command Prompt-ICC Native (Visual Studio 2008 mode). 
[picture here]

This launches a command window that has the right environment of Intel C++ Compiler for MeeGo in Visual Studio 2008 compatible mode. 

Next is to launch Qt Creator from MeeGo SDK 1.2: 

>> [MeeGoSDK-install-root]\QtCreator\bin\QtCreator
 

Creating a New Qt Project “hello_world”


Inside QtCreator, click menu [File > New File or Project], select "Qt Gui Application" under "Qt C++ Project", follow the wizard and name the project “hello_world”, on the following dialog for selecting “Targets”, select only “Simulator-MSVC2008":

 

 

Set Target

And use all defaults for other selections. When completed, the “hello_world” project is created.  

Click on [Edit] button and the following window is displayed:

 

Now a default empty project “hello_world” is created.

Let’s add a button with “Hello World !”:
1. Double click on file “mainwindow.ui” under “Form” folder, and it opens the form in design window.
2. Drag & drop the [Push Button] on the left to the Form; double click on the name in the middle and type “Hello World !”. 

 

 

Now the project “hello_world.pro” is created.  

 

Building hello_world.pro with Default Compiler Visual C++ 2008*
The “hello_world.pro” project is created with target “Simulator-MSVC2008”, the corresponding spec file is “-spec win32-msvc2008” and the compiler is set to cl.exe by the spec file.
Click “Project” button on the left side of QtCreator to open the project setting window like below:  

Note the spec file "win32-msvc2008" in the red cycle.

Select “Build” from menu “Build”, the following output is displayed: note the compiler “cl” and linker “link”.

 

Building hello_world.pro with Intel C++ Compiler
The “hello_world” project is created to target “Simulator Qt for Visual Studio 2008 (Nokia Qt SDK)”. It uses the spec file “win32-msvc2008” that means the Visual C++ 2008 compiler is used.
Click [Project] button on the left to go to the project settings window, click [Details ▼] and add “-spec C:\MeeGoSDK_1.1\MADDE\sysroots\meego-core-ia32-madde-sysroot-1.1-fs\usr\share\qt4\mkspecs\win32-icc-m2008” in “Additional arguments” field like below:

 

Note:  the full path to “win32-icc-m2008” is needed because it is not part of “Simulator-MSVC2008” toolchain. If copying the “win32-icc-m2008” to “[NokiaQtSDK-install-root]\ Simulator\Qt\msvc2008\mkspecs” folder, “-spec win32-icc-m2008” can be used.
Now click menu “Build > Rebuild All”, and click “Compile Output” tab at the bottom of QtCreator to view the build output:

See the “icl” and “xilink” in the screen-shot above. The build is successful.

 

Applying or Changing Compiler or Link Options

Please check this article on how to apply or change the compilation or link options for a Qt project.
The Release Notes contains the detail information on the optimization options offered by the Intel C++ Compiler for MeeGo.

 

Running hello_world.pro in Simulator-MSVC2008
This “hello_world” project is created with one target only, so there are no extra steps in order to run the program in Qt Simulator for Visual Studio 2008.
Click on the   button, and it will start the hello_world program inside Qt Simulator like below: 
 

QtSim 

 

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

 

0