One-time setup. Takes about 5 minutes. After building, you can use STARK via CLI or C++ code.
Before installing, make sure you have the following tools available on your system.
Choose your platform and follow the steps below.
DOWNLOAD FROM GITHUBGo to the GitHub repository and download the ZIP file. Extract it to your project folder.
# You should end up with a path like:
C:\my_project\starkdb
Press Windows Key, type cmd, right-click, and select "Run as Administrator".
# Go to STARK folder
cd C:\my_project\starkdb
mkdir build
cd build
# Generate makefiles and build
cmake .. -G "MinGW Makefiles" -DBUILD_SHARED=ON
mingw32-make
Copy the built library and headers to your MinGW directories so any project can use STARK.
# Copy library files
copy libstark.dll C:\mingw64\bin\
copy libstark.dll.a C:\mingw64\lib\
# Copy headers
copy ..\bindings\cpp\stark.hpp C:\mingw64\include\
copy ..\core\include\stark.h C:\mingw64\include\
#include <stark.hpp> in any C++ project on your system.cd ~/Desktop/my_project
git clone https://github.com/abdullahtnz/starkdb.git
cd starkdb
mkdir build
cd build
cmake .. -DBUILD_SHARED=ON
make
sudo make install
sudo ldconfig
make install copies the library to /usr/local/lib and headers to /usr/local/include. ldconfig refreshes the shared library cache.After installation, create a quick test file to make sure everything works.
// test.cpp
#include <stark.hpp>
#include <iostream>
int main() {
stark::Database db("test_db");
db.add(1, "Hello STARK!");
std::cout << db.get(1) << std::endl;
return 0;
}
Compile and run:
# Linux
g++ test.cpp -lstark -o test
./test
# Windows (MinGW)
g++ test.cpp -lstark -o test.exe
test.exe
If you see Hello STARK! printed to the console, installation was successful.
Once installed, you can use STARK in two ways:
Read the full documentation for detailed CLI command reference and C++ API methods.
Make sure CMake is installed and added to your PATH. Download from cmake.org.
Install MinGW-w64 from mingw-w64.org and add C:\mingw64\bin to your system PATH.
On Linux, run sudo ldconfig to refresh the shared library cache. On Windows, make sure libstark.dll is in a directory listed in your PATH (e.g., C:\mingw64\bin).
Ensure you're linking with -lstark and the headers are in your compiler's include path. If you installed with sudo make install, they should be in /usr/local/include and /usr/local/lib.
Feel free to reach out for help or report issues.
โ [email protected]