Community
cancel
Showing results for 
Search instead for 
Did you mean: 
arrahul
Beginner
94 Views

Intell IPP with visual studio 2010

Hai

While using Intel IPP with Intel parallel studio XE with built in Intel C++ compiler, how do we include the static libraries and dynamic run time libraries if we are using a visual studio based IDE. We have the option of specifying the static libraries(.lib) directroy path under the linker section( Additional library directories)in the project properties. But merely doing this , does it include all the relevant libraries or do we need to specifically include all the library names under Additional dependencies tab. How do we include the run time libraries or when do we use the "redist " folder outside the ipp folder. ? I hope the redist folder is the dynamic library. How do we link it to the application at our hand using vidual studio 2010?

Thanks
Rahul

0 Kudos
5 Replies
Amante_Mangaser
Beginner
94 Views

This documentation that comes with the IPP installation maybe of help, particularly the section on "Configuring Your Microsoft* Development Environment to Link with Intel IPP":

C:\Program Files\Intel\Composer XE 2011 SP1\Documentation\en_US\ipp\ipp_userguide\index.htm

Note the path may be different on your machine - it should be relative to where you installed it.

arrahul
Beginner
94 Views

Thanks a lot . I appreciate. I have one more question regarding the use of environment variables. If we run the batch file that comes along with the intel Ipp to set the environment variables, Path, Lib and Include, I found that I dont have to inlcude these variables in the IDE ( Visual Studio 2010) that I was using. I was able to compile the code without the setting of these Paths in the include directories and Linker options. My question is why it is given as two different sections in the user manual that comes along with the Intel IPP use for windows OS. That is it is written that even If we set the environment variables using the batch files, we need to include those paths in the visual studio enviornment. And moreover in Visual Studio 2010 I dint find any way to include the run time libraries other than including their path inside the Linker dependencies. Is this the right way to do it? Or do we need to create a separate system environment variable and add the path of " redist" appended to the PATH environment variable in the list of system environment variables already existing there.

SergeyKostrov
Valued Contributor II
94 Views

Hi Rahul,

Here is an example of a manual way to include lib-files,and headers, of course:

...

#if defined ( _IPL_SUPPORT_ )
#include
#include
#pragma comment ( lib, "ipl.lib" )
#endif

#if defined ( _IPP_SUPPORT_ )
#include
#include
#pragma comment ( lib, "ippixx.lib" ) // Image Processing library
#pragma comment ( lib, "ippsxx.lib" ) //Signal Processing library
#endif
...

Where xx is a two-digit number.

Take into account, that any valid path could be specified in libname specificator( lib, "<libname>" ) of a #pragma comment directive, like

#pragma comment ( lib, "..\..\ippixx.lib" )
or
#pragma comment ( lib, "..\Folder1\Folder2\ippixx.lib" )
etc

Ialways use#pragma comment directive approach because it gives more flexibility.

Best regards,
Sergey

arrahul
Beginner
94 Views

Thanks a lot Sergey. I appreciate.
Ying_H_Intel
Employee
94 Views

Hi Arrahul,

You may refer to the article : Compiling and Linking with Microsoft* Visual C++* and Intel C++ Compilerand Introduction to Linking with the Intel IPP 7.0 Library

Simply speaking, There are two kind of Intel IPP libraries:
1. static libraries: including serial static librayr ipp*_l.ib under "lib" folder and threaded static library ipp*_t.lib.
2. dynamic libraries: including dynamicimported library ipp*.lib under lib and dynamic library under the "redist " folder. (once you link imported library, the binary will link the correspondingdll at run time).

and there are multiple ways to implementeither static link moreor dynamic link modein MSVS 2010.
For example, manually include allimported library names under Additional dependencies tab orwrite thecode as sergeysuggested.

or use thequick guide in IDE enviornment as below figure, which will setconfiguration for your applicationautomatically.

But please note, during run time, you should make sure the executable file can search these dlllibraries. either in current folder, solution folder, system folder or the folders wheresystem environment variable PATHpoint to.

In general, when install intel composer(ipp), the path C:\Program Files (x86)\Intel\Composer XE 2011 SP1\redist\ia32\ipp have been added in PATH. but if not, you may need to add it manually.

Best Regards,
Ying

Reply