Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Link IPP7.0 statically in custom lib


Hope that my problem have answers, here is my trouble:

I would like to link statically some IPP functions in another library. This new librarythat included IPP functions could be dynamic or static but must not dynamic depend on IPP library because I want it to be redistribuable.
I created a library project (named A) with options to link IPP statically:
-Use IPP: Multi-threaded static libray

I also set 2 more options:
-Code generation -> runtime libray to Multi-threaded
-Link library dependencies to yes

The library is generated without issues but by linkingit to my executable, I get some unresovled symbol. They correspond to the IPP functions.

3>ipo : warning #11021: unresolved _ippsFIR_32f@16

3>ipo : error #11023: Not all components required for linking are present on command line
3> xilink: executing 'link'
3>LINK : fatal error LNK1104: cannot open file 'ippac_t.lib'

It seems that the IPP functions used are not included in my library A.

I'm using visual2010 with IPP7.0 (from Composer XE 2011 SP1).

Is there something wrong with my configuration?
Is there any way to solve this problem?


0 Kudos
3 Replies
Hi ems5612,

Could you pleasecheck the size of your library A and when you create the library A, do you havesome clause, like"#includeipp.h"

I' mguessing that, if your library A is a static library and when Use IPP: Multi-threaded static libray is open,itwon'tincludIPP static libraryinto your library A. So when you call linkA to your executable, you get link error " LINK : fatal error LNK1104: cannot open file 'ippac_t.lib'".

There are some solution for the problem.
1) for example, include ipp.h and link ipp*_t.lib in your library A in property package manually. Thus all specifed IPP static library will be included your library A.

But if you check the size of A, you will find the A is so large (more often, you may not want to distribute such hugethe library).

2) so we usually, recommend to build custom dll. which is based on IPP static library and based on the functions list you will called.

IPP provide custom dll builder sample, you may download itby going here.

Library Linking and Advanced Usage

MAIN - Custom DLLs and Static Libraries - advanced-usage\linkage\custom[dll|so|lib] -
Use custom DLLs, threaded and non-threaded merged static libraries, and different linking methodologies to produce smaller sized applications.

Best Regards,

0 Kudos
Hello Ying, We have a similar problem. We use VS 2010 yet employing Intel C++ compiler. We link statically the the threaded library (Same version). We also link OpenMP. We create 2 different files each doing different Image Processing algorithm. Each by itself works nicely, yet when we run them serially on the same image it breaks. I think there's a problem with threading since when we switch the the 'l' version of files it works perfectly. I saw on the documentation we are recommended to link OpenMP dynamically. Yet, we can't locate the option to link threaded IPP statically and OpenMP dynamically. Moreover, let's say we link OpenMP dynamically, which file should be distributed with the files? Could it be just in the same folder as the main file? Thanks.
0 Kudos
Ok, I have the solution. Even with the /MT flag, OpenMP will be dynamically linked. In order to let the linker use Intel's OpenMP the flag '/NODEFAULTLIB:libiomp5mt.lib' should be used in the linker command line. In order to statically link the OpenMP the following flag should be added to the compiler command line '/Qopenmp-link:static' in addition to '/MT'. I hope it will assist others.
0 Kudos