Ошибка в подключаемой бибилиотеке в Qt
Пишу свою библиотеку и в ней использую стороннюю библиотеку loping, в про файле либы его подключаю все это делаю. Когда подключаю либу к проекту, начинает ругаться на функции этой библиотеки. Прикрепляю про файлы проектов. pro файл либы
TEMPLATE = lib
CONFIG += staticlib
CONFIG += c++11
CONFIG += adtlib
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
win32 {
SOURCES += WIN\ADTComponent.cpp
SOURCES += WIN\ADTNode.cpp
LIBS += -lws2_32
LIBS += -liphlpapi
}
unix {
SOURCES += LIN/ADTComponent.cpp
SOURCES += LIN/ADTNode.cpp
LIBS += -loping
}
HEADERS += \
include/ADTComponent.h \
include/ADTNode.h
# Default rules for deployment.
unix {
target.path = $$[QT_INSTALL_PLUGINS]/generic
}
!isEmpty(target.path): INSTALLS += target
pro файл проекта где проверяю либу
CONFIG += c++11 console
CONFIG -= app_bundle
LIBS += -loping
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
INCLUDEPATH += /home/danila/Qt/Projects/ADTLib/include
LIBS += /home/danila/Qt/Projects/build-ADTLib-Desktop_Qt_5_12_2_GCC_64bit-Release/libADTLib.a
Сама функция которая не работает
{
bool res = false;
pingobj_t *pingobj = ping_construct();
int timeout = 4;
for (;;)
{
double timeout_sec = ((double)timeout)/(double)(1000.0);
if (ping_setopt(pingobj, PING_OPT_TIMEOUT, &timeout_sec))
break;
if (ping_host_add(pingobj, host.toStdString().c_str()))
break;
if (ping_send(pingobj) <= 0)
break;
res = true;
break;
}
ping_destroy(pingobj);
return res;
}
main.cpp где проверяю
#include <ADTNode.h>
#include <oping.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
pingToHost("127.0.0.1");
return a.exec();
}