1
votes

I'm trying to use Intel IPP with MingW(mingw-w64\x86_64-8.1.0) using NetBeans 12.2 and also tried with Eclipse 2021-06 (4.20.0) in Win10. Specified the include("C:/Program Files (x86)/Intel/oneAPI/ipp/2021.3.0/include") and dll's("C:/Program Files (x86)/Intel/oneAPI/ipp/2021.3.0/redist/ia32") path in the project settings.

For the below sample code,

#include <iostream>
#include <ipp.h>
using namespace std;

int main(int argc, char** argv) 
{
    const       IppLibraryVersion *lib;
    IppStatus   status;
    Ipp64u      cpuFeatures, enabledFeatures;
    
    Ipp8u *gray= NULL; 
    IppiSize size;
    IplImage* img = NULL; // new IplImage structure img
    
    /* Init IPP library */
    ippInit();                      /* Initialize Intel(R) IPP library */
    lib = ippGetLibVersion();/* Get Intel(R) IPP library version info */
    printf("%s %s\n", lib->Name, lib->Version);

    return 0;
}

I'm getting error, Error: 'IplImage' was not declared in this scope;

Also, on commenting the line :IplImage* img = NULL; I get the following error,

g++ -o dist/Debug/MinGW-Windows/samplecppapplication build/Debug/MinGW-Windows/main.o -L"C:/Program\ Files
(x86)/Intel/oneAPI/ipp/2021.3.0/redist/ia32" -lippcc -lippccg9 -lippcch9 -lippccp8 -lippccs8 -lippccw7 -lippch -lippchg9 -lippchh9 -lippchp8 -lippchs8 -lippchw7 -lippcore -lippcv -lippcvg9 -lippcvh9 -lippcvp8 -lippcvs8 -lippcvw7 -lippdc -lippdcg9 -lippdch9 -lippdcp8 -lippdcs8 -lippdcw7 -lippe -lippeg9 -lippeh9 -lippep8 -lippes8 -lippew7 -lippi -lippig9 -lippih9 -lippip8 -lippis8 -lippiw7 -lipps -lippsg9 -lippsh9 -lippsp8 -lippss8 -lippsw7 -lippvm -lippvmg9 -lippvmh9 -lippvmp8 -lippvms8 -lippvmw7 c:/MuTest/MinGW/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lippcc c:/MuTest/MinGW/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lippccg9 c:/MuTest/MinGW/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lippcch9 .... ...

Can you please help in fixing this and get to work using IPP ?

1

1 Answers

0
votes

I tried the ipp sample with g++ compiler which comes with mingw-w64\x86_64-8.1.0 in windows10 command prompt(initialize oneapi environment before compiling the code) and it worked fine (after commenting the line :IplImage* img = NULL). I've included libraries from intel64 folder in ipp directory which comes with oneapi, as i'm using 64 bit windows machine.

g++ test.cpp -o ipptest -I "C:\Program Files (x86)\Intel\oneAPI\ipp\2021.3.0/include" -L "C:\Program Files (x86)\Intel\oneAPI\ipp\2021.3.0\redist\intel64" -lippcore