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

Visual Studio Static Linking

franknatoli
New Contributor I
544 Views
Would like to avoid having to bundle any DLLs, whether Intel or Microsoft, with any product that uses IPP and/or UMC. To avoid needing to supply Visual Studio redistributables, it is of course necessary to tweak every UMC related Makefile to use "/MT" not "/MD" and that I've done. And while audio-video-codecs Makefiles already produce full not stub LIBs as delivered from Intel, image-codecs do not, and it was necessary to further tweak all image-codecs Makefiles to create full not stub LIBs in order to avoid a dozen new DLLs.

Now the question is: is it possible to avoid having to package the IPP DLLs? In the process of doing what I describe above, Visual Studio started requesting various ipp*_l.lib files rather than the non-dash-el files. The dash-el files are typically ten times the size of the non-dash-el files and I presume they are statically linked and NOT requiring corresponding DLLs. But I can't convince Visual Studio to use only dash-el files and thus avoid the DLLs.

Is there a way to do this? Remove all references or necessities to IPP DLLs? Thanks.
0 Kudos
6 Replies
SergeyKostrov
Valued Contributor II
544 Views
Quoting franknatoli
Would like to avoid having to bundle any DLLs, whether Intel or Microsoft, with any product that uses IPP and/or UMC.
...
Is there a way to do this? Remove all references or necessities to IPP DLLs? Thanks.


You need to use astatic linking for ALL 3rd party DLLs. That is, fora DLLwithCRT-functions, possibly MFC
DLLs ( if it is used ), IPP DLLs, etc.

Also, try to use MS Depends utility to evaluate what your current list of 3rd party DLLs is.

Best regards,
Sergey

0 Kudos
SergeyKostrov
Valued Contributor II
544 Views
Quoting franknatoli
Is there a way to do this? Remove all references or necessities to IPP DLLs? Thanks.


Take into account two more cases:

- Delay Loaded DLLs
- DLLs loaded with 'LoadLibrary' or 'LoadLibraryEx' Win32 API functions ( it isthe "worst" case )

Best regards,
Sergey

0 Kudos
franknatoli
New Contributor I
544 Views
Sergey: I am reasonably certain that I have thoroughly removed all references to Microsoft related DLLs. My problem is hidden references to Intel IPP [not UMC] DLLs. For example, I have one VS2010 project that needs to link with ippac.lib [the stub library that effectively links to the complementary DLL]. If I remove ippac.lib from the link instructions, and substitute ippac_l.lib [the full library], the VS2010 linker demands ippac.lib. This cannot be anything related to Microsoft. It must be something in the audio-video-codecs that demands ippac.lib not ippac_l.lib. But how?
0 Kudos
SergeyKostrov
Valued Contributor II
544 Views
Quoting franknatoli
...
If I remove ippac.lib from the link instructions, and substitute ippac_l.lib [the full library], the VS2010 linker demands ippac.lib. This cannot be anything related to Microsoft. It must be something in the audio-video-codecs that demands ippac.lib not ippac_l.lib. But how?
...


Try to search for:

#pragma comment ( lib, "\ippac.lib" )

inthesourcefiles ( *.h, *.cpp, etc ).

0 Kudos
Sergey_K_Intel
Employee
544 Views
Try to compile your project with "_IPP_SEQUENTIAL_STATIC" or "_IPP_PARALLEL_STATIC" macros defined. These definitions must put proper directives into object files. There will be no need to update linker input files.
[cpp]#if !defined( _IPP_NO_DEFAULT_LIB )
  #if defined( _IPP_PARALLEL_DYNAMIC )
    #pragma comment( lib, "ippac" )
    #pragma comment( lib, "ippcore" )
  #elif defined( _IPP_PARALLEL_STATIC )
    #pragma comment( lib, "ippac_t" )
    #pragma comment( lib, "ippdc_t" )
    #pragma comment( lib, "ipps_t" )
    #pragma comment( lib, "ippcore_t" )
  #elif defined( _IPP_SEQUENTIAL_STATIC )
    #pragma comment( lib, "ippac_l" )
    #pragma comment( lib, "ippdc_l" )
    #pragma comment( lib, "ipps_l" )
    #pragma comment( lib, "ippcore_l" )
  #endif
#endif[/cpp]
0 Kudos
franknatoli
New Contributor I
544 Views
Beautiful, thanks.
0 Kudos
Reply