TestsTested | ✗ |
LangLanguage | C++C++ |
License | Apache 2 |
ReleasedLast Release | Dec 2014 |
Maintained by Romain Péchayre.
This is a manual port of ZXing to C++. It has been tested on Linux, Mac OS X and Windows.
SCons is a build tool written in Python. You'll need to have Python
installed, but scons installation is optional: a run time copy of
SCons (called scons-local
) is included. To use the included copy,
replace scons
with python scons/scons.py
in the instructions below.
To build the library only:
cd
to the cpp
folderscons lib
To build the command line utility utility:
scons zxing
build/zxing
for a command line referenceTo build the unit tests (optional):
libcppunit-dev
on Ubuntu)scons tests
build/testrunner
To clean:
scons -c all
CMake is a tool, that generates native makefiles and workspaces. It integrates well with a number of IDEs including Qt Creator and Visual Studio.
Usage with Qt Creator:
CMakeLists.txt
as new projectUsage with Makefiles, Visual Studio, etc. (see cmake --help
for a complete list of generators):
cd
to cpp/build
cmake -G "Unix Makefiles" ..
cmake -G "Visual Studio 10" ..
You can switch between build modes by specifying:
-DCMAKE_BUILD_TYPE=Debug
or-DCMAKE_BUILD_TYPE=Release
To profile the code (very useful to optimize the code):
valgrind --tool=callgrind build/zxing - path/to/test/data/*.jpg > report.html
To run the black box tests and check for changes:
zxing-img
, e.g., scons zxingbash blackboxtest.sh 2>&1 | tee bb.results
diff bb.results blackboxtest.results