I using 3rd party library functions in my Qt application, but it's reporting errors such as "undefined reference to bp_attach collect2 : error: ld returned 1 exit status
".
I have build 3rd party library (ion-dtn) from source code and did make
& make install
. I am certain that it has installed successfully in my Ubuntu system.
I have included its header file "bp.h"
and Qt doesn’t complain about that. But when I compile I get the error mentioned above. Here is my .pro file:
QT += core gui
QT += network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = MYUDP
TEMPLATE = app
INCLUDEPATH += /usr/local/include/
LIBS += -L /usr/local/lib
PKGCONFIG +=ion-d
SOURCES += main.cpp\
myudp.cpp
HEADERS += myudp.h
FORMS += myudp.ui
Path of "bp.h" where bp_attach function is declared is /usr/local/include/bp.h
.
Libs for 3rd party library are installed in /usr/local/lib
and is defined in .pro.