Problems implementing ofxZxing

I am trying to get QR code detection working, but right now I am having trouble getting it set up correctly. Using 0.8.1 and the most recent version of ofxZxing, the examples work fine, but trying to set it up in one of my projects gives me errors saying that LuminanceSource isn’t linked correctly. I added the include in the header search path and used the project generator to make a new one with only ofxZxing. Any tips on getting it working?


You have to link binary with library libzxing which are in ofxZxing/libs/zxing folder.
Except for Windows lib, which is unfortunately not there.
If you’re on osx, look at build phases of the example project.

ooh BTW if anyone has a lib for windows that is working with ofxZxing please share :slight_smile:

I went through, made sure libzxing was linked, but still nothing… I think it has to do with how I am calling to that include folder in the project.xcconfig, but I can’t figure out what is wrong with how I am doing it:

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) "../../../addons/ofxZxing/include"

(And in my header, I am including #include “ofxZxing.h”)


I have a recompiled version for vs2013 in 64 bit and an updated (hacked around) ofxZxing to accomodate the changes in the Zxing api. I can share the project files with you if it may help.

That would be great! Thank you!

Ace are you using XCode or Visual studio ? From what you said earlier I thought you were a mac user (and a vs library wouldn’t do you much good unfortunately)

Using Xcode. Sorry, yeah I am a mac user, new to this world of programming though!

You should double check you have added the libzxing.a file to your project (it’s in the libs/osx/ folder of the addons) or you should specifically tell the linker to look for it (maybe a flag like -lzxing somewhere) while adding the library folder to the search path of the linker.

There might be an easier way of doing it but I have not enough experience on xcode to help you with that.

(The include files tell your software what the zxing library can do, while the .a is the actual code of the library which is doing the work)

I’m interested ! Thanks

libzxing.a is included, I’m not entirely sure how I would go about adding that flag for the linker though. If anybody has a working patch using Xcode 5, it would be a huge help.

Hey Ace, did you ever find a solution for this?
I’m struggling with the same issues here…

hey caiodv, are you using it on your desktop machine or an iOs device? I recently used
for an iOs 9 app. Works fine with objective C integrated AVCaptureMetadataOutput Object.

hey michif, no I’m doing a desktop application, I was actually trying to implement a newer version of zxing, to use multiple qr codes at the same time…