Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open input file 'debug\cameraimagewrapper.oby #230

Open
Qmlio opened this issue Feb 7, 2023 · 3 comments
Open

Cannot open input file 'debug\cameraimagewrapper.oby #230

Qmlio opened this issue Feb 7, 2023 · 3 comments

Comments

@Qmlio
Copy link

Qmlio commented Feb 7, 2023

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

@Artasov
Copy link

Artasov commented Feb 16, 2024

Same problem on da qt6.3.2 MSVC 64 C++17

@Artasov
Copy link

Artasov commented Feb 16, 2024

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

image
image

@Artasov
Copy link

Artasov commented Feb 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants