tsqlite
A wrapper for sqlite that uses tlibc for error handling.
Build
-
Clone this repository.
git clone https://timerix.ddns.net/git/Timerix/tsqlite.git -
Install cbuild. Select latest version compatible with the one in
project.config. Example: For2.3.0download latest2.3.x. -
Clone tlibc. By default
dependencies/tlibc.configexpects thattlibc/is present in the same directory astsqlite/. If you cloned it to another directory, changeDEPENDENCIES_DIRintsqlite/project.user.config.git clone https://timerix.ddns.net/git/Timerix/tlibc.git -
Install sqlite library.
MinGW:pacman -S mingw-w64-x86_64-sqlite3 -
Build and run tests
cd tsqlite cbuild build_exec exec -
To build library use tasks
build_static_lib[_dbg]orbuild_shared_lib[_dbg] -
If you use tsqlite as static library, add
LINKER_LIBSfrom tsqliteproject.configto your project.
Usage
#include "tsqlite.h"
int main(){
Deferral(32); // reserve memory for 32 defers
// init tlibc global variables
try_fatal_void(tlibc_init());
// init tsqlite global variables
try_fatal_void(tsqlite_init());
Defer(tlibc_deinit());
Defer(tsqlite_deinit());
Return 0; // call defers
}
Description
Languages
C
52.4%
Shell
47.6%