Hi there,

I'm the maintainer of zxing-cpp. I'd like to provide some hopefully
helpful information:

1. missing "ReadBarcode.h": that is most likely due to the removal of
an explicit "-I[...]/ZXing" from the zxing.pc, see
https://github.com/zxing-cpp/zxing-cpp/discussions/921. So replacing
that with '#include "ZXing/ReadBarcode.h"' should work for both 2.x as
well as 3.x

2. The include file name "ZXVersion.h" was deprecated in 2.3 and is
now removed in 3.0. My advice would be to use the following:

#if __has_include("ZXing/ZXingCpp.h") // future proof one-stop-shop header
#include "ZXing/ZXingCpp.h"
#else
#include "ZXing/ReadBarcode.h"
#include "ZXing/ZXVersion.h"
#endif

3. I would suggest to drop support for versions < 2.0

4. The format names RSS_14 and RSS_EXPANDED have been replaced by
their official terms "DataBar" and "DataBar Expanded" for years now.
So this code stopped working a long time ago. Unfortunately, in 3.0
their symbol names have changed again, due to the expansion of the
supported set of DataBar formats.

5. The line "{BARCODE_FORMAT_DATA_MATRIX, "PNG", "png"}," could have
never worked.

6. BARCODE_FORMAT_UPC_EAN_EXTENSION was removed years ago as well.

7. the line 
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp?ref_type=heads#L426
has silently "worked" in the sense that an invalid name (e.g.
"rss_14") lead to the library to search for all supported codes. In
3.0 it will now throw if passed a name that can not be parsed.

I would have posted this upstream but don't have an account...

 - Axel

Reply via email to