I'm trying to add a library to a project. https://github.com/AlexanderVatov/DuckX. Using qmake. I encountered the following errors when executing the test code proposed by the author of the library: errors
I built the library via Cmake and compiled it in Visual Studio 2019. Then I added the library as "External library" referring to https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html.
.pro file looks like this:
QT -= gui
CONFIG += c++11 console
CONFIG -= app_bundle
SOURCES +=
main.cpp
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/duckx/lib/ -lduckx
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/duckx/lib/ -lduckxd
else:unix: LIBS += -L$$PWD/duckx/lib/ -lduckx
INCLUDEPATH += $$PWD/duckx/include/duckx
DEPENDPATH += $$PWD/duckx/include/duckx
HEADERS +=
duckx/include/duckx/constants.hpp
duckx/include/duckx/duckx.hpp
duckx/include/duckx/duckxiterator.hpp
duckx/include/duckx/pugiconfig.hpp
duckx/include/duckx/pugixml.hpp
duckx/include/duckx/zip.h`
To solve the problem, I tried to rebuild the project and use different compilers