How to add Intel Performance Primitives to my project? ippInit() failure
-
wrote on 9 May 2020, 22:03 last edited by
Hello,
I am just a newbie on Qt and couldn't resolve IPP instantiation on my project.
In my .pro file i added the includepath and libs as followsINCLUDEPATH += $$(IPP_DIR)
where I set in Environmental Variables as IPP_DIR = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\include
LIBS += $$(IPP_LIB_X64)\ippcore.lib $$(IPP_LIB_X64)\ippsmt.lib $$(IPP_LIB_X64)\ippvmmt.lib $$(IPP_LIB_X64)\ippcoremt.lib
where I set in Environmental Variables as C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\lib\intel64_win\threaded
in mainwindow.cpp is my simple code:
code_text ```#include <ipp.h> #include <ippcore.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); const IppLibraryVersion* libVersion; IppStatus status; Ipp64u cpuFeatures, enabledFeatures; ippInit(); /* Initialize Intel(R) IPP library */ libVersion = ippGetLibVersion();/* Get Intel(R) IPP library version info */ qDebug() << libVersion << endl; status = ippGetCpuFeatures(&cpuFeatures, 0);``` code_text
it builds successfully both in Release and Debug modes but crashes when i run the program.
Can anyone suggest me how to add Intel Performance Primitives properly ? Thank youMaya
-
Hi,
Did you add the folder where the corresponding dlls can be found to the PATH environment variable ? If not, go to the Run part of the Project panel and modify it there.
-
Hi,
Did you add the folder where the corresponding dlls can be found to the PATH environment variable ? If not, go to the Run part of the Project panel and modify it there.
wrote on 10 May 2020, 14:08 last edited by D.Maya 5 Oct 2020, 14:16@SGaist said in How to add Intel Performance Primitives to my project? ippInit() failure:
Hi,
Did you add the folder where the corresponding dlls can be found to the PATH environment variable ? If not, go to the Run part of the Project panel and modify it there.
Yes I have added the necessary PATH entries, as indicated in my post. But I guess i'm referencing wrong ones..??
My .pro files as followsLIBS += $$(IPP_LIB_X64)\ippcore.lib $$(IPP_LIB_X64)\ippsmt.lib $$(IPP_LIB_X64)\ippvmmt.lib $$(IPP_LIB_X64)\ippcoremt.lib $$(IPP_LIB_X64)\ipps.lib INCLUDEPATH += $$(IPP_DIR)
and the system variables are as follows
IPP_DIR = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\include IPP_LIB_X64 = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\lib\intel64_win\threaded
but still the program crashes whenever I add the ippInit() function call as stated in previous message.
I also checked the Run part of the Project panel as you suggested and saw that Base Environment for this run configuration is set to Build Environment and has all the System variables added to PATH are visible there.

-
There might be a misunderstanding here. I am talking about the environment variable that is literally called PATH. And there's no trace of it in your screenshot.
-
There might be a misunderstanding here. I am talking about the environment variable that is literally called PATH. And there's no trace of it in your screenshot.
wrote on 12 May 2020, 10:50 last edited by@SGaist I have selected System Environment for Build environment and there PATH exists.
I have already added the binaries path to my System Environment PATHand my simple .pro file, I have changed it to this
Now I was able to build the code.
Both way of declaring the LIBS works fine. Either explicitly but with " " and use / instead of \I used as User Variables:
IPP_DIR = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\include IPP_LIB_X64 = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\ipp\lib\intel64_win
and as System Variable
INTEL_IPP_PATH = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2020.1.216\windows\redist\intel64_win\ipp
It worked fine.
Keeping it here for whom getting trouble to add Intel Performance Primitives integration to Qt.
1/5