shanliu/zxing_cpp

php扩展的zxing-cpp包装器,从图像中替换二维码

dev-main 2022-04-08 13:54 UTC

This package is auto-updated.

Last update: 2024-09-08 19:01:50 UTC


README

php扩展的zxing-cpp包装器

ZXing-C++,更多详情请见:https://github.com/nu-book/zxing-cpp

支持php >=7.0

API文档:zxing_cpp.php

教程:查看示例

windows动态链接库:dll/php_zxing_cpp_php8.*.dll 提示: 根据您使用的PHP版本下载,仅PHP > 8和x64已编译。其他版本可以根据以下文档编译

为Linux或mac编译

cd zxing_cpp # go to your `shanliu/zxing_cpp` src dir
git clone --progress -v --depth 1 https://github.com/nothings/stb stb-src
git clone --progress -v --depth 1 https://github.com/nu-book/zxing-cpp zxing-cpp-src
cd zxing-cpp-src && cmake . && make && make install && cd .. # Maybe you set prefix??
phpize && ./configure --with-stb-dir=stb-src # ./configure --help see more config
make && make install

为Windows编译

加载构建环境并构建

open [x64|x86] Native Tools Command Prompt for VS 2019 build env #need use >=vs2019
load PHP build env \your-php-sdk-binary-tools-dir\bin\phpsdk_setvars.bat 
cd zxing_cpp #download `shanliu/zxing_cpp` to ext/zxing_cpp and go to the zxing_cpp dir 
win_dep.cmd #download lib
cd your_php_src # go to your php src dir
buildconf.bat
configure --disable-all --enable-cli --enable-zxing_cpp=shared 
nmake