........
git clone https://github.com/glassechidna/zxing-cpp.git
cd zxing-cpp/
mkdir build
cd build/
export CXXFLAGS="-fPIC"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make && sudo make install
Let me know if this works.
I am missing another file, this will probably be a thing for a while so I will tell you what did work.
When I compiled v2.2, it compiled correctly and I have been using that version for staking now.