I created a dll
created using the IPP function ippiFFTGetSize_C_32fc ()
.
Referencing this dll file from wpf project (c #) results in System.DllNotFoundException: Unable to load DLL 'TEST.dll'
error.
int HioTest(Ipp32fc* csSrcImg, Ipp32fc* csDstImg)
{
// FFT Init
IppiFFTSpec_C_32fc *pSpec = NULL; /* Pointer to FFT spec structure */
Ipp8u *pMemInit = NULL, *pBuffer = NULL; /* Pointer to the work buffers */
int sizeSpec = 0, sizeInit = 0, sizeBuf = 0; /* Size of FFT spec structure, init and work buffers */
int order = 9;
ippiFFTGetSize_C_32fc(order, order, IPP_FFT_DIV_INV_BY_N, ippAlgHintAccurate, &sizeSpec, &sizeInit, &sizeBuf);
return 5;
}
I created a TEST.dll
(C language) using IPP for External library. I want to refer to TEST.dll
in my wpf project and use it.
The tool used is "visual studio 2017" and the IPP version uses the latest version of compilers_and_libraries_2019.1.144
.
See the IPP documentation. The settings of the dll project,
- Debug / x64
- Add
ippsmt.lib, ippcoremt.lib
forAdditional Dependencies
. - Automatic "single-threaded DLL" setting.
export .def
created.- Add
ippInit ()
to dllmain.cpp - Referencing from C # . /clr setting
C # project
- Debug / x64
- unlock the loader
- Increase the reserve stack size
I set it up like this.
Other ippMalloc (), ippsAdddC_32f_I ()
The dll
file I created using the above worked properly in my wpf project. However, TEST.dll containing ippiFFTGetSize_C_32fc ()
will result in an error System.DllNotFoundException: Unable to load DLL 'TEST.dll'
.
I want to know the cause or solution.