Skip to content

Instantly share code, notes, and snippets.

@iamazeem
Last active March 11, 2024 20:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamazeem/2517a577c788e9b5bc9abe30fe3647a5 to your computer and use it in GitHub Desktop.
Save iamazeem/2517a577c788e9b5bc9abe30fe3647a5 to your computer and use it in GitHub Desktop.
SQLite3: set up and install with vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg search sqlite3
./vcpkg install sqlite3[tool]
# headers, static library, and command-line tool
$ tree installed/x64-linux/{include,lib,tools}
installed/x64-linux/include
├── sqlite3ext.h
└── sqlite3.h
installed/x64-linux/lib
├── libsqlite3.a
└── pkgconfig
└── sqlite3.pc
installed/x64-linux/tools
└── sqlite3
1 directory, 5 files
# compiler and linker flags
$ PKG_CONFIG_PATH=./installed/x64-linux/lib/pkgconfig/ pkg-config --cflags --libs sqlite3
-DSQLITE_OS_UNIX=1 -I./installed/x64-linux/lib/pkgconfig/../../include -L./installed/x64-linux/lib/pkgconfig/../../lib -lsqlite3 -lm -ldl -lpthread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment