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

Making DLL from ipp source

tcorp1
Beginner
826 Views
I've build ipp speech codec project, and everything is fine with it, but I don't know whether I can to make that project as dll. Is there any special properties that I have to change in my project to build dll? And another question is if I will run that dll on PC that doesn't have installed IPP software, would it work well , or there would be missing some libraries or so?
Thanks.
0 Kudos
4 Replies
Ying_H_Intel
Employee
826 Views
DearTcorp,

If you build ipp speech codec project in Microsoft Visual studio, you can change the project's property by
Open project's property page =>Configuration Properties=>General=>Configuration Type => change the Static library (.*.lib) to dynamic library (*.dll).

But as i understand, the purposeyou change project to dll is to remove the IPP software dependency,thus you can run that dll on PC that haven't IPP software, right?If yes, thenthe change is not needed . Actually,IPP support 4 kind of link mode.
1. dynamic link
2. static link
3. customer dll link
4. single static link

Please see the detials
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-intel-ipp-linkage-models-quick-reference-guide/

No.2, 3, 4 guareetee one applicationrun other PCwithout IPP software installed.
among of the link mode, theNo.2 seems easiest.You can only change the project property by
Open project's property page =>Linker=>Input change ipps.lib ippsc.lib (dynamic)etc. to ipps_l.lib ippsc_l.lib.(static serial library), then produced exe don't depend on IPP software.

Additionally, please note,
1. most ofspeech codec projectsproducestatic librarythemselves, where the IPP library is not needed during compile phase.
2. Only several application project produce exe, which need the static library and IPP library during compile phase. If IPP static libraryare linked during compile, then no IPP library neededduring run time.
So as you see, the key is in the phase of compile of the application project.

You can try the No.3 too. Please see the readme \ipp-samples\advanced-usage\linkage\customdll

Best Regards,
Ying
0 Kudos
apolo74
Beginner
826 Views
Hi guys,
I'm trying to distribute a couple of my libraries which are using IPP to PCs that don't have IPP installed. For this I've decided to follow option 3 (custom made library) and everything works perfectly for Linux and MacOS but I'm having problems with Windows. I get the customdll files (myIPP_t.dll, myIPP_t.lib) from the ipp-samples example, but I can not link them into a testing program.

I have added the "__declspec(dllexport)" lines before those functions that I want to export and in my Windows7 (64bit) machine that has IPP installed everything runs well. I am using CMake to compile across all platforms, the only difference between UNIX and Windows CMakeLists.txt is that in the former I include the pthread library whereas in the later I don't. The problem comes when I try to run my testing code in a machine with Windows and NO IPP installed... I get several errors like:
error LNK2019: unresolved external symbol _ippsAdd_64f@16 referenced in function "void __cdec1 main(...
This happens in both the Visual Studio 2010 solution created by CMake and also when I run the compiler in a command line:
cl /I\path\to\headers main.cpp /link \path\to\myIPP_t.lib
I am sure that the libraries are where they are supossed to be and that they are in the environmental variables but still it is like the the compiler is not finding the libraries, right? or maybe the libraries do NOT contain the IPP functions that I need... just can't figure out how windows work? Any ideas???
Boris
0 Kudos
Sergey_K_Intel
Employee
826 Views
Hi Boris,
Could you make sure you are exporting ippsAdd_64f function? Use dumpbin from VS2010 command line window. The "dumpbin /exports .lib" must show the list of exported functions. The sample's customdll shows
Exports
ordinal name
_ippGetStatusString@4
_ippiGetLibVersion@0
_ippiGetSpatialMoment_64f@28
_ippiMomentFree_64f@4
_ippiMomentInitAlloc_64f@8
_ippiMoments64f_32f_C1R@20
_ippsFree@4
_ippsGetLibVersion@0
_ippsMalloc_32f@4
_ippsSum_32f@16
_ippsThreshold_32f_I@16
After I added "ippsAdd_64f" to export.def file, the dumpbin started showing
_ippsAdd_64f@16
among with other names.
Please, check your export definitions file.
Regards,
Sergey
0 Kudos
apolo74
Beginner
826 Views
Dear Sergey,
first sorry for not replying before... I did the "dumpbin /EXPORTS myIPP.lib" and I get something similar to what you wrote in your message:
File Type: LIBRARY
Exports
ordinal name
ippGetCpuClocks
ippGetCpuFreqMhz
ippGetNumThreads
ippGetStatusString
ippStaticInit
ippiConvValid_32f_C1R
ippiCopyConstBorder_32f_C1R
ippiCopyWrapBorder_32f_C1R
ippiCopy_32f_C1R
ippiGetLibVersion
ippiTranspose_32f_C1R
ippsAddC_64f_I
ippsAddProductC_32f
ippsAdd_64f
ippsAdd_64f_I
ippsZero_32f
ippsZero_64f
Summary
C6 .debug$S
14 .idata$2
14 .idata$3
8 .idata$4
8 .idata$5
E .idata$6
It's not exactly the same since your functions have a "_" before them and a @16 in the end. Does this mean that there is something wrong with the generation of my customdll???

Another question is that I previously thought that I was using these customdll libraries when compiling other libraries but it seems I was making a mistake in Visual Studio... in the "Configuration Properties" of my VS project I was setting the "Intel Performance Libraries">"Use IPP" to "Shared DLL", and I guess that means that VS was going to use the local IPP libraries instead of my customDLL. What should I do in the VS project to use my customDLL libraries instead???
Thanks for your help,
Boris
0 Kudos
Reply