Loading repository data…
Loading repository data…
misuo / repository
Sample C++ Hello World program using CMake, Conan.io package manager and SQLite3 library.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This is a small C++ Hello World program testing a project build using CMake as build generator with integrated conan.io package manager consuming (using and linking) with SQLite3 library.
The C++ program main.cpp itself is trivial:
#include <iostream>
#include <sqlite3.h>
int main()
{
std::cout << "Hello World!" << std::endl;
std::cout << "SQLite3 version " << sqlite3_libversion() << std::endl;
return 0; // Success
}
First establish out-of-source build/ folder, so that source folder is not polluted:
$ mkdir build
$ cd build
Initialize your project with conan - this is using the conanfile.txt specifying that SQLite (v3.15.2) is an dependency and that conan should integrate with CMake:
$ conan install ..
:bulb: If you see error Try to build from source with --build then do the following to build the actual SQLite library from its source:
$ conan install --build SQLite3
Generate the build files using CMake:
$ cmake ..
Build the project:
$ make
If everything went successfully, you can run the built executable:
$ bin/mytest
Expected output:
Hello World!
SQLite version 3.15.2