Open Qmlio opened 1 year ago
Same problem on da qt6.3.2 MSVC 64 C++17
That's how I have it
QT += core gui widgets concurrent network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
include(QZXing/QZXing.pri)
QMAKE_CXXFLAGS += -P
SOURCES += \
main.cpp \
scanner.cpp
HEADERS += \
scanner.h
FORMS += \
scanner.ui
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
I have solved the problem. Just don't use QZXing with 6.3.2 MSVC qmake. Use a regular zxing-cpp built using the visual studio dev console. https://github.com/zxing-cpp/zxing-cpp
cmake -S zxing-cpp -B zxing-cpp.release -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_STANDARD=17 -A x64
zxing-cpp.release -> rename -> zxing | and move to project folder
Connect the library to the .pro file
win32: LIBS += -L$$PWD/zxing/core/Release/ -lZXing
INCLUDEPATH += G:/zxing-cpp/core/src
DEPENDPATH += G:/zxing-cpp/core/src
win32:!win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/ZXing.lib
else:win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/libZXing.a
Make an include. Please note that the order of imports is sometimes important.
#include "ReadBarcode.h"
#include <ImageView.h>
#include <BarcodeFormat.h>
... and others if you need
Hello Am currently stuck when building the qzxing.pro with this error " cannot open input file'debug\cameraimagewrapper.obj' .. actually there is no .obj file being generated, please any help will be appreciated