Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PandaWhoCodes/fa819228814ab345debd765b918277d6 to your computer and use it in GitHub Desktop.
Save PandaWhoCodes/fa819228814ab345debd765b918277d6 to your computer and use it in GitHub Desktop.
  1. install zbar on windows with include and library files

  2. make sure mingw installed and bin directory added to the path

  3. in PYTHONPATH\Lib\distutils, create a file distutils.cfg and add two lines:

    [build]

    compiler=mingw32

  4. get dll lib and include file from ftp://sourceware.org/pub/pthreads-win32/dll-latest copy files to PATH_MINGW32/[lib,bin,include] separately, just need file name like pthreadGC2 and remember to chang the name to libpthread

  5. change or add lines in setup.py:

    extra_compile_args=['-std=c99', '-IPATH_TO\ZBar\include', '-lPATH_TO\ZBar\lib'],

    extra_link_args=["PATH_TO\ZBar\lib\libzbar.dll.a"],

    remove line libraries=['zbar'],

  6. run python setup.py install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment