libqrencode undefined reference error
-
Hi guys, this is my first time posting here, I need some help with generating QR code using fukuchi qrencode library, I'm using QT 5.14 on Windows and I followed the instructions on this website to generate and implement the library
https://www.programmerall.com/article/9877982530/
However, when I tried to run the sample program, it gives me an undefined reference error on QRcode_encodeString and QRcode_free
Can you guys help me?
-
Hi guys, this is my first time posting here, I need some help with generating QR code using fukuchi qrencode library, I'm using QT 5.14 on Windows and I followed the instructions on this website to generate and implement the library
https://www.programmerall.com/article/9877982530/
However, when I tried to run the sample program, it gives me an undefined reference error on QRcode_encodeString and QRcode_free
Can you guys help me?
-
Here's my .pro file
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # 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 \ mainwindow.cpp HEADERS += \ libqrencode/qrencode.h \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target win32: LIBS += -L$$PWD/libqrencode/ -llibqrencode INCLUDEPATH += $$PWD/libqrencode DEPENDPATH += $$PWD/libqrencode win32:!win32-g++: PRE_TARGETDEPS += $$PWD/libqrencode/qrencode.lib else:win32-g++: PRE_TARGETDEPS += $$PWD/libqrencode/libqrencode.a
-
@tiamat Please post the pro file. Undefined reference means that the lib is either not found or is incompatible.