Compiling zbar on OSX

If you’re trying to compile zbar the open source bar code reader on OS X with jpeg support and want to use the MacPorts jpeg lib, and getting this error

checking for jpeg_read_header in -ljpeg... no
configure: error: in `/skroner/temp/zbar/zbar-0.10':
configure: error: unable to find libjpeg! ensure CFLAGS/LDFLAGS are set appropriately or configure --without-jpeg        

you can use the following command line to get it working:

CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure --disable-video --without-qt --without-python --without-gtk --with-libiconv-prefix=/opt/local --with-jpeg=yes

it’s a cool program!

This entry was posted in "software enginerring", foss, ocr, open source, OSX, workaround and tagged , , , , . Bookmark the permalink.

1 Response to Compiling zbar on OSX

  1. zilla says:

    I found this to be really helpful. Too bad there’s no MacPorts package for this, even after somebody filed a ticket an entire year ago.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s