Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to add Intel Performance Primitives to my project? ippInit() failure
QtWS25 Last Chance

How to add Intel Performance Primitives to my project? ippInit() failure

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    D.Maya
    wrote on last edited by
    #1

    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 follows

    INCLUDEPATH += $$(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 you

    Maya

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        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.

        D Offline
        D Offline
        D.Maya
        wrote on last edited by D.Maya
        #3

        @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 follows

        LIBS +=  $$(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.
        ![alt text](f7fdbbcf-5edd-43f5-ae42-602a71d4cf98-image.png image url)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            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.

            D Offline
            D Offline
            D.Maya
            wrote on last edited by
            #5

            @SGaist I have selected System Environment for Build environment and there PATH exists.
            I have already added the binaries path to my System Environment PATH

            380ee00c-0194-4cfb-9648-eb56c264e66f-image.png

            and my simple .pro file, I have changed it to this

            e562ec0b-59b1-45a2-9871-65f86e1ed80b-image.png

            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.

            095ef654-10d1-4140-a790-c0bac6ca9162-image.png

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved