Qt 6.11 is out! See what's new in the release
blog
ZXing compiling error
-
I'm going to create a barcode reader program with ZXing.
I've managed to retrieve the repository using
FetchContent.However, whenever I compile, I get this error:
:-1: error: ld.lld: error: undefined symbol: ZXingQt::BarcodeReader::metaObject() const
There's more to this...
The cmake is like this:
target_link_libraries(appZXing
PRIVATE Qt6::Quick
ZXing::ZXing
) -
target_link_libraries(appZXing PRIVATE Qt6::Quick ZXing::ZXing ZXing::ZXingQt )Do it like this
-
I solved the problem by adding
#include "moc_ZXingQt.cpp"to the end of the cpp file, but thanks anyway :) -
A AlperenCvs has marked this topic as solved