Monday, 10 January 2022

How to manually link IPP libraries

 IPP or oneAPI installs a visual studio extension that does all this linking for you, but if you are using a version of visual studio that is no longer supported, or if the extension just isn't installing for you for some reason (like I found...) then here's how to static link it manually.

You may need to add additional libraries for your needs but this is the gist of it:

Windows:

The windows libraries seem to have both static and dynamic libraries with .lib file extensions. Static libraries have an "mt" suffix in the library name.

So add the following libraries to be linked

ippimt.lib

ippsmt.lib

ippcoremt.lib

ippvmmt.lib

note: we can check if a library is static or dynamic from the visual studio command prompt. Use "dumpbin /ARCHIVEMEMBERS name.lib" on the library. Dynamic libraries will show .dll in the output and a static will show .objs.

Then add the following path for the library search

C:\Program Files (x86)\Intel\oneAPI\ipp\latest\lib\intel64

or "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\ipp\lib\intel64" for pre-oneAPI installs

And finally the include path:

C:\Program Files (x86)\Intel\oneAPI\ipp\latest\include

or "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\ipp\include" for pre-oneAPI installs

Xcode:

The static and dynamic libraries are in the same folder, and xcode will prioritise the dynamic libraries therefore we must link using the whole path

-L /opt/intel/oneapi/ipp/latest/lib/libippi.a

-L /opt/intel/oneapi/ipp/latest/lib/libipps.a

-L /opt/intel/oneapi/ipp/latest/lib/libippvm.a

-L /opt/intel/oneapi/ipp/latest/lib/libippcore.a

or "/opt/intel/ipp/lib/" for pre-oneAPI installs

Then add this path to the header search paths

/opt/intel/oneapi/ipp/latest/include

or "/opt/intel/ipp/include" for pre-oneAPI installs

No comments:

Post a Comment

  Azure Trusted Signing Signtool Error SignTool Error: An unexpected internal error has occurred. Error information: "Error: SignerSign...