--- a/src/videofilters/zxing_qrcode.cpp
+++ b/src/videofilters/zxing_qrcode.cpp
@@ -44,8 +44,10 @@
 #define ZX_USE_UTF8
 #if ZXING_USE_BUILD_INTERFACE
 #include <ReadBarcode.h>
+#include <Version.h>
 #else
 #include <ZXing/ReadBarcode.h>
+#include <ZXing/Version.h>
 #endif
 
 #if defined(__clang__) || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
@@ -120,6 +122,10 @@ static int set_decoder_rect(MSFilter *f,
 	qrc->decoderRect = *rect;
 	return 0;
 }
+#if ZXING_VERSION_MAJOR >= 3
+typedef ZXing::ReaderOptions DecodeHints;
+typedef ZXing::Barcodes Results;
+#endif
 
 static void read_qrcode(MSFilter *f) {
 	QRCodeReaderStruct *qrc = (QRCodeReaderStruct *)f->data;
