Setting up SQLite 3.49.0 in Visual Studio 2022 using CMake
        
            - Install SQLite using this guide: How to install SQLite 3.49.0 using CMake and Visual Studio 2022 for Desktop
 
            - Run Visual Studio
 
            - Click on the "Create a new project" button:
 
            
            - Click on the "CMake Project" and click on the "Next" button:
 
            
            - Type a project name, set a project location, check the "Place solution and project in the same directory" checkbox, and click on the "Create" button:
 
            
            - Wait a few seconds for configuration
 
            - Run the project by click on the empty green triangle (or Ctrl+F5):
 
            
            - The program prints "Hello CMake" to the console:
 
            
            - Double click on the "CMakeLists.txt" file:
 
            
            - Add this code to the "CMakeLists.txt" file:
 
target_include_directories(hello-sqlite PRIVATE E:/libs/sqlite-3.49.0-msvc/win/debug/include)
target_link_directories(hello-sqlite PRIVATE E:/libs/sqlite-3.49.0-msvc/win/debug/lib)
target_link_libraries(hello-sqlite PRIVATE sqlite3)
            Double click on the "hello-sqlite.cpp" file:
            
            Replace the "hello-sqlite.cpp" file content with this one:
#include <iostream>
#include <sqlite3.h>
int main()
{
    sqlite3* db;
    int rc = sqlite3_open("test.sqlite3", &db);
    if (rc)
    {
        std::cout << "Can't open database" << std::endl;
    }
    else
    {
        std::cout << "Opened database successfully" << std::endl;
    }
    sqlite3_close(db);
    return 0;
}
            Press Ctrl+F5 to run the application
            You see the following result in the console:
Opened database successfully
            The SQLite database file was created in the "E:\projects\hello-sqlite\out\build\x64-debug" folder: