ObjectBox C and C++
ObjectBox.ioSync DocsFollow us
  • ObjectBox C / C++ Database
  • Installation
  • How to get started
  • Entity Annotations
  • Generator
  • Store
  • Queries
  • Relations
  • Transactions
  • Schema Changes
  • Time Series Data
  • Dev Tools and Debugging
  • FAQ
  • GitHub
  • ObjectBox Generator
  • C API docs
  • Golang Database
  • Swift Database
  • Java Database
Powered by GitBook
On this page
  • How do I distribute ObjectBox?
  • How to increase the maximum database size (by default 1 GB)?

Was this helpful?

FAQ

Frequently asked questions about ObjectBox C and C++.

PreviousDev Tools and Debugging

Last updated 9 months ago

Was this helpful?

How do I distribute ObjectBox?

Don't forget to bundle the dynamic library (so/dylib/dll) with your program when distributing/packaging for a installer. Having the library in the same directory as your program binary should be enough for Windows. For other system, you might need to ensure the installation library to the system directory (usr/lib or /usr/local/lib) or one of the paths specified inLD_LIBRARY_PATH(Linux) orDYLD_LIBRARY_PATH(macOS).

How to increase the maximum database size (by default 1 GB)?

Symptoms: error messages like "Could not put", "Storage error(code -30792)" indicate that the database has reached a maximum. Using a maximum will prevent using up all disk space (and potentially rendering the system unusable), e.g. by faulty code.

The 1 GB limit is a default, which can be changed via options. In C++ there's an Option class for that and in C there are obx_opt_*() functions. These options have to be prepared before opening the store.

To increase the DB limit, use in C++. For C, it's .

obx::Options::maxDbSizeInKb(uint64_t sizeInKb)
obx_opt_max_db_size_in_kb(OBX_store_options *opt, uint64_t size_in_kb)