How to build IPP application in Linux environment

Notes : This article is for Intel® IPP older than the version 7.0

for newer versions please check


Below we will give an example on how to build an IPP project in Linux within two steps.

Prerequisite: $source <ipp install path>/em64t/tools/env/

  • Required Software installed: Intel® IPP library install package:
  • Supported Compiler: gcc, g++ and related tools or Intel® C++ Compiler version for Linux* OS for IA-32 processors and Intel 64 processors (optional).


Please note that  the latest IPP version(IPP 7.0 Update 2)changed the library name and library directories: New Directory Structure and Library Naming Scheme for Intel® IPP 7.0 Library 
You may change the library name and path correspondingly.  

The library is available as a stand-alone product or as a component in Intel® Parallel Studio 2011, Intel® Parallel Studio XE 2011, Intel® C++ Studio XE 2011, Intel® Composer XE 2011, and Intel® C++ Composer XE 2011. Please visit the Intel® Software Evaluation Center to download evaluation versions of these and other Intel software products.


Step 1 – Call Intel® IPP Functions

Calling Intel IPP functions is as simple as calling any other C functions. Include the relevant header file (ex. ipp.h) and then call the function with correct parameters.

The example code is as follows:

#include “ipp.h”
void main()
IppiSize roi = {5,4};
Ipp8u x[8*4] = {0};
ippiSet_8u_C1R(1, x,8, roi); //call ippiSet_8u_C1R() function in ipp.h


Save this file as main.c.

Step 2 – Build Intel® IPP Projects

Build using gcc in command line. We will take Intel IPP 64bit as an example:

  • Set environment:                                        export ipp_install_path="/opt/intel/ipp/6.1.x"
  • For dynamic link, the command is:             $gcc -o main main.c -I <ipp install path>/em64t/include -L <ipp install path>/em64t/sharedlib -lippiem64t -lippsem64t -lippcoreem64t -liomp5 -lpthread -lm
  • For static link, the command is:                  $gcc -o main main.c -I <ipp install path>/em64t/include -L <ipp install path>/em64t/lib -lippiemergedem64t -lippimergedem64t -lippsemergedem64t -lippsmergedem64t -lippcoreem64t -lpthread
  • For threaded static link,  the command is   $gcc -o main main.c -I <ipp install path>/em64t/include -L <ipp install path>/em64t/lib -lippimergedem64t -lippimergedem64t_t -lippsmergedem64t -lippsmergedem64t_t -lippcoreem64t_t.a -liomp5 -lpthread

To see why we link these libraries in the command and to clarify the problem which libraries should be linked for my own project, you can refer to Library dependencies by domain.

If you build successfully, you can get the executable file: main.

*Note 1: <ipp install path> is the path where your IPP is installed, e.g. /opt/intel/ipp/6.x/, /opt/intel/Compiler/11.x/0xx/ipp/. 

*Note 2: The article command sample is for Intel 64 application.  For IA32 application, the command is same: 
-I <ipp install path>/ia32/include -L <ipp install path>/ia32/sharedlib -lippi -lipps -lippcore -liomp5 -lpthread -lm

*Note 3: As Which version of Intel IPP, Intel MKL and Intel TBB is installed by the Intel® Compiler Professional Edition? mentions, Intel Compiler Professional Edition have IPP as a component . At the same time, Intel Compiler provide a compile option -ipp instead linking ipp manually, thus if using Intel Compiler Professional Edition, the build command become simple:
$icc *.c -ipp

Step 3 - Run Intel® IPP Binary 

If using the Intel® IPP shared libraries, you need to add the path to the libraries to the system variable LD_LIBRARY_PATH by either using the shell script or manually setting the environment.

  • Use the Intel IPP shell script to set the required environment variables for shared library dispatching and building code samples:
    • Open a Terminal.
    • Navigate to the Intel IPP directory /tools/env.
    • Type source ( or for Intel® 64 processors)

 Manually set the environment variable:

    • Open a Terminal.
    • If the libraries are in the /opt/intel/ipp/X.X/ia32/sharedlib folder, and then type export LD_LIBRARY_PATH=/opt/intel/ipp/X.X/ia32/sharedlib:$LD_LIBRARY_PATH



Common error messages

  • Error message: main.c:(.text+0x49): undefined reference to `ippiSet_8u_C1R'
    1. Make sure to link all dependent libraries. To solve the problem above, you should check your build command to see if it contains the library, "-lippiem64t".
    2. Make sure to link the libraries in appropriate order. For example, if your command contains both "-lippiemergedem64t" and "-lippimergedem64t". Make sure to put "-lippiemergedem64t" before "-lippimergedem64t" in command, otherwise you will get this "undefined reference" either.
  • Error message: /opt/intel/ipp/ undefined reference to `pthread_atfork'
    • Please make sure to link "-lpthread" library in your command line.Error message: /opt/intel/ipp/ In function `ippiSet_8u_C1R': (.text+0x3): undefined reference to `ippJumpIndexForMergedLibs' 
        If your command line links libraries from <ipp install path>/em64t/lib, please make sure to contain "-lippcoreem64t" library.
  • Other libiomp5 error: OpenMP run time librarylike is provided by Intel® Compiler. It may locate in Compiler directory: OpenMP Run-time Libraries Changed since Intel IPP 6.0 and Intel MKL 10.1

For more complete information about compiler optimizations, see our Optimization Notice.


Ivan T.'s picture

Hello! I have Error " undefined reference to `ippiSet_8u_C1R' ", and how i understand i have to do step 3 for solution, but:
I have problems with Step 3 (l_ipp_7.1.1.117_intel64). I found /opt/intel/ipp/bin/ and /opt/intel/ipp/bin/intel64/ but a Terminal wrote that both of them "can't open".

Sergey Kostrov's picture

Thanks. Let's see if it really helps Linux developers ( one guy has a problem... ).

Gennady F. (Intel)'s picture

Some additional comments to these article:
For Supported Compiler:
For the latest ( IPP® 6.1 beta ) - Supported C compilers (Intel IPP has been tested with the following): IntelR C++ Compiler version 10.1 , 11.0 and 11.1 Beta for Linux* OS
for IA-32 processors and Intel 64 architecture
Linux Developer tools component installed, including gcc, g++ and related tools.

and for Step 2 – Build Intel® IPP Projects:

If you want to use the Intel IPP functions threaded with the OpenMP* and linked with Static libraries,
must link the following libraries to your application:
libiemergedem64t.a, libimergedem64t_t.a libcoreem64t_t.a, and additionally libiomp.a.

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.