Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hvz
Beginner
63 Views

Using IPP in a library

This question may have been asked before, but it's kinda hard to find something using the combination of IPP and Library...

I need to build a Windows library (.lib) for someone and I'm using XE2015 with IPP 8.2. I have built the library here, with 'Using Intel IPP' set to 'Single Threaded Static Library'. I also made a small program to test it, which also needs 'Using Intel IPP' set to the same value, and that works fine.

Now, the person who's going to use it is using Visual Studio 6 with IPP 5.0. And he's getting a linker error: LINK : fatal error LNK1104: cannot open file "C:\Program Files (x86)\Intel\Composer XE 2015\ipp\include\ippcore.h/../../lib/ia32/ippcoremt.lib"

Previously, when I was still using Intel C++ 11.1 with IPP 7.1, he could use my library without any issues (well there were a few, but they were easy to fix). Beside having him install the newest IPP, which would probably cause problems for his own code, and creating a DLL instead, are there any other options to make this work?

0 Kudos
1 Reply
Sergey_K_Intel
Employee
63 Views

Hi!

Yes, this is not a new question )). The static library file, being compiled with whatever IPP library, doesn't bear IPP code within. After compilation and build, which is not more than appending several object files into one archive called LIB file, the object file have

  • references to external libraries
  • as long as you compiled it with "Using Intel IPP=Single Threaded Static Library" option of compiler, Microsoft-specific object file directive (something like ".drectve "lib-name") to ease access to required library file.

In other words, library file has calls to function A from IPP and hints of what library to use. In your case these hints are library name "C:\.....\ippcoremt.lib", because you compile your source files with IPP 8.2, where IPP's core library file is ippcoremt.

On customer's computer the linker has to do actual application build. So, it takes customer object file(s) and your library file. As long as your library file contains directive to link to "...ippcoremt.lib", the customer linker tries to find this lib and link to it. The customer system has no IPP 8.2 and no ippcoremt.lib file, so linker cannot finish its job.

Generally speaking, there is only way to separate new IPP 8.2 functions and customer IPP v.5/6/7/whatever version application.

  • Create a custom DLL at your computer with IPP 8.2 library. In this case, the DLL will contain required IPP functions inside, and export only custom functions (your functions) required by customer. The linking with IPP will be done on your computer and no IPP 8.2-specific stuff will be required on customer's computer.

All other solutions are exotic and could not be recommended.

Reply