To start developing with ObjectBox you'll need to get the library and the generator executable.
The APIs come as a single header file for C and C++:
C++: include/objectbox-cpp.h (depends on objectbox.h)
Compile your code against it and use the runtime shared library (.so, .dylib, .dll depending on the platform) to link against.
There are a couple of ways to get the library:
Using the download.sh script (on Windows, use something like Git Bash to run it)
Either clone the repo and run
... or get download.sh and run it in a terminal:
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/master/download.sh)
Get the latest binary by browsing its Bintray repository (Conan repository format): https://bintray.com/objectbox/conan/objectbox-c%3Aobjectbox
Details on the download.sh script:
Creates a "download" directory and a version dependent sub directory named like "libobjectbox-0.1-some-hex-hash".
Inside the version dependent sub directory, you will find the directories "include" and "lib"/
The "lib" directory contains the binary library.
Gives you an option to install the library to
/usr/lib (linux) or
Don't forget to include the library (so/dylib/dll) with your program when distributing/packaging for installer, otherwise your program users won't be able to run it.
Having the library in the same directory as your program binary should be enough for Windows. For other OSs you might need to ensure the installation library to the system directory (
/usr/local/lib) or one of the paths specified in
ObjectBox uses FlatBuffers high-performance binary representation to achieve cross-platform compatibility of the stored data. Google provides FlatBuffers implementation for various languages, including C++ and there's an independent implementation for C as well (third-party & semi-official - Google points to for C support). You can thus make your choice depending on the language you use.
For C: get flatcc library and headers. You can link your program to the to the static runtime library.
For C++: get flatbuffers headers. Objectbox shared library already includes flatbuffers symbols so no additional linking should be necessary.
ObjectBox Generator is a tool that will help you with during development of your application (and as opposed to the objectbox shared library, it's not supposed to be distributed with your app).
objectbox-generator executable by downloading the version for your OS from releases. If you want, add it to
$PATH for convenience. Alternatively, instead of downloading, you can build the generator yourself by cloning this repo and running
make. To build yourself, you need a recent Go version, CMake and a C++11 tool chain.