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
libqrencodelibraryvcpkg(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://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install
libqrencodeusing Homebrew:brew install qrencode
- Install
libqrencodeusing 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
vcpkglibrary directory:C:\path\to\vcpkg\installed\x64-windows\lib
- Add additional dependencies:
- Go to
Linker > Input > Additional Dependencies - Add
qrencode.lib
- Go to