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

aboutcustom dll

anilch
Beginner
301 Views
If I try to build a custom dll
an error comes i.e.
cl is not an recognized command
Ms environment is not setup
how cani remove this error
0 Kudos
3 Replies
Ying_S_Intel
Employee
301 Views
The custom dll tool included in the current version of IPP may only work with older version of Microsoft* Visual C++* 6.0 compiler and nmake utility.
We will improve the compatibility issue with the latest version of compiler in next version of IPP ( 5.0).
At this time, you may check the following sample code that includes mydll.h, mydll.cpp and customdynamcitest.cpp to see how to custom dll.
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004 Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither name of Intel Corporation nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////
//==================mydll.h================
#ifndef __MYDLL_H__
#define __MYDLL_H__
#ifndef IPPAPI
#define IPPAPI(type,name,args)
#include "ipps.h"
#undef IPPAPI
#define IPPAPI(type,name,args) extern type __STDCALL my_##name args;
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* List Function Prototypes Here */
IPPAPI(IppStatus, ippsCopy_8u,( const Ipp8u* pSrc, Ipp8u* pDst, int len ))
#ifdef __cplusplus
}
#endif
#endif // __MYDLL_H__
//=========== mydll.cpp======================
#define WIN32_LEAN_AND_MEAN
#include
#include
#undef IPPAPI
#define IPPAPI(type,name,args)
__declspec(naked dllexport)
void __STDCALL my_##name args { __asm {jmp name } }
#include "mydll. h"
BOOL WINAPI DllMain(HINSTANCE hinstDLL,
DWORD fdwReason, LPVOID lpvReserved)
{
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
ippStaticInit();
default:
hinstDLL;
lpvReserved;
break;
}
return TRUE;
}
//====================customdynamictest.cpp=================
#include "stdafx.h"
#include "mydll.h"
void main(int argc, char* argv[])
{
const int SIZE = 256;
Ipp8u pSrc[SIZE], pDst[SIZE];
int i;
for (i=0; ipSrc = (Ipp8u)i;
my_ippsCopy_8u(pSrc, pDst, SIZE);
printf("pDst[%d] = %d ", SIZE-1, pDst[SIZE-1]);
}
Hope it helps.
Thanks,
Ying
Intel Corp.
0 Kudos
napoleon9th
Beginner
301 Views
What options do i need to set when building these files?

Also, i don't have anything about Custom DLLs (neither a sample nor a tool) in my IPP installation. Is that because they are only available in the "full" version? (I am using an evaluation ATM.)
0 Kudos
Vladimir_Dudnik
Employee
301 Views

Hi,

You will not able to build custom DLL with evalauation version of IPP beacause evaluation version does include static libraries and custom DLL are built from them. For full version you should be able to find custom DLL example in folder ia32 oolscustomdll, where is root folder of your IPP installation.

Regards,
Vladimir

0 Kudos
Reply