valentindush / mysql-cpp-starter

mySQL C++ starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USING MYSQL IN C++ [FOR WINDOWS ONLY]

Using MYSQL in C++ using MYSQL-CPP-CONN package (vcpkg package manager)

How to run

Prerequisites

  1. Mingw (C/C++ compiler and debugger)
  2. Visual Studio C++ tools [Desktop apps with C++ workload is required]
  3. CMake
  4. vcpkg

Clone this repo

git clone <this repo>.git

Add the [mingw, cmake and vcpkg] into path [skip this part if mingw, vcpkg and cmake are in path already] if you are using Clion add the following into the path

C:\Program Files\JetBrains\CLion 2024.1.2\bin\mingw
C:\Program Files\JetBrains\CLion 2024.1.2\bin\cmake\win\x64\bin
C:\Users\User\.vcpkg-clion\vcpkg

Replace User with your PC username

Install packages

vcpkg install

Configure Cmake

cmake ---preset="default"

Build

cmake --build build

Run the application

./build/Debug/HelloWorld.exe

you can find more info about vcpkg at vcpkg.io

About

mySQL C++ starter


Languages

Language:C++ 93.3%Language:CMake 6.7%