Building application with Intel IPP - Unresolved external symbol



  • Hello-

    I am trying to write a very simple 'Hello World' C++ program that makes use of IPP. I am developing on Windows using Qt's Creator IDE. All my program does for now is call ippInit. The code is below:

    @#include <QCoreApplication>
    #include "ippcore.h"

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    ippInit();
    
    return a.exec&#40;&#41;;
    

    }@

    My project file (.pro) file is also very simple, see below. BTW, we happen to store our IPP libraries in a 'third party' directory for historical reasons. Note that I am not making use of any of the path variables defined when you run Intel's install script. But I'm assuming, perhaps incorrectly, that not having those defines is not what is killing me.

    @#-------------------------------------------------

    Project created by QtCreator 2014-10-08T13:50:59

    #-------------------------------------------------
    QT += core
    QT -= gui

    IntelIPPlibs = -lippac -lippcc -lippch -lippcv -lippdc -lippdi -lippi -lippj -lippm -lippr -lipps -lippsc -lippvc -lippvm -lippcore

    Set the intel path based upon the platform.

    ThirdPartyLibraryPath = ../../../../thirdparty
    win32: IntelIPPPath = $${ThirdPartyLibraryPath}/Intel/Windows/ipp
    linux: IntelIPPPath = $${ThirdPartyLibraryPath}/Intel/Linux/ipp

    win32 {
    DEFINES += WINNT
    LIBS += -L$$IntelIPPPath/lib/intel64 $$IntelIPPlibs
    }

    unix {
    DEFINES += LINUX
    LIBS += -L$$IntelIPPPath/lib/intel64 $$IntelIPPlibs
    }

    INCLUDEPATH += $${IntelIPPPath}/include

    TARGET = HelloIPP
    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app
    SOURCES += main.cpp@

    When I attempt to build, I get the following error:

    main.obj : error LNK2019: unresolved external symbol ippInit referenced in function main debug\HelloIPP.exe : fatal error LNK1120: 1 unresolved externals

    I am using the MSVS 2012 64 bit compiler. I suspect the problem MIGHT have to do with how the MSVC compiler is mangling the function names, but I see in ipp.h that it makes use of the "extern "C"" so that does not seem to be the problem.

    Any suggestions would be greatly appreciated! Driving me crazy for the past six hours...

    Regards,

    Jim


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you sure you are linking to the library containing that symbol ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.