diff --git a/backend/qr.c b/backend/qr.c index e1a432dd..9ee523e2 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -21,9 +21,11 @@ */ #include -#include /* The assumption is that this is already installed */ #include "common.h" +#ifdef WITH_QR +#include + static int kanji = 0; static QRecLevel level = QR_ECLEVEL_L; @@ -92,3 +94,13 @@ int qr_code(struct zint_symbol *symbol, unsigned char source[]) return errno; } + +#else +/* Handler if no QR Encode library is available */ +int qr_code(struct zint_symbol *symbol, unsigned char source[]) +{ + strcpy(symbol->errtxt, "error: QR Code library not available"); + return ERROR_INVALID_OPTION; +} +#endif +