# How to Compile Speedb

Check the prerequisites before you start compiling in the [dependencies](/getting-started/dependencies.md) page.&#x20;

### Compile in Release mode

* **Recommended:** `make static_lib` will compile the Speedb static library (`librocksdb.a`) in release mode.
* `make shared_lib` will compile the Speedb shared library (`librocksdb.so`) in release mode.

### Compile in Debug mode

{% hint style="info" %}
**Important**: If you plan to run Speedb in production, don't compile using the default `make` or `make all` invocations. This will compile Speedb in debug mode, which is much slower than release mode.
{% endhint %}

* `make check` will compile Speedb in debug mode and run all the unit tests.
* `make all` will compile Speedb's static library, and all tools and unit tests. These tools depend on gflags, so you'll need to have gflags installed to run `make all`. This will compile Speedb in debug mode. Also, please don't use binaries compiled by `make all` in production.

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.speedb.io/getting-started/how-to-compile-speedb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
