https://github.com/interkosmos/fortran-lmdb
Fortran 2018 interface bindings to LMDB
https://github.com/interkosmos/fortran-lmdb
berkeleydb database databases fortran fortran-2018 fortran-package-manager key-value key-value-database key-value-store lmdb nosql
Last synced: about 2 months ago
JSON representation
Fortran 2018 interface bindings to LMDB
- Host: GitHub
- URL: https://github.com/interkosmos/fortran-lmdb
- Owner: interkosmos
- License: isc
- Created: 2024-04-28T16:38:39.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-09-28T13:38:24.000Z (7 months ago)
- Last Synced: 2025-09-28T15:49:13.174Z (7 months ago)
- Topics: berkeleydb, database, databases, fortran, fortran-2018, fortran-package-manager, key-value, key-value-database, key-value-store, lmdb, nosql
- Language: Fortran
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fortran-lmdb
A collection of Fortran 2018 interface bindings to the OpenLDAP
[Lightning Memory-Mapped Database](http://www.lmdb.tech/doc/) (LMDB), a
B-tree-based database management library modeled loosely on the Berkeley DB
API.
## Build Instructions
The LMDB package has to be installed with development headers. On FreeBSD, run:
```
# pkg install databases/lmdb
```
On Linux, instead:
```
# apt-get install liblmdb-dev
```
### Make
If GNU Fortran is used to build the interface library, select the build target
depending on your operating system.
On FreeBSD:
```
$ make freebsd
```
On Linux:
```
$ make linux
```
On Windows:
```
$ make windows
```
Or, overwrite the argument `PPFLAGS`. Install the library and the module files
system-wide, for example:
```
$ make install PREFIX=/opt
```
Link your programs against `/opt/lib/libfortran-lmdb.a -llmdb`. Alternatively,
overwrite the default compiler and the compiler/preprocessor flags:
```
$ make FC=ifx FFLAGS="-O3" PPFLAGS="-D__linux__"
```
Build and run the test program:
```
$ make test
$ ./test_lmdb
```
### Fortran Package Manager
Pass the operating system as an additional flag to the
[Fortran Package Manager](https://github.com/fortran-lang/fpm). On FreeBSD:
```
$ fpm build --profile release --flag "-D__FreeBSD__"
```
On Linux:
```
$ fpm build --profile release --flag "-D__linux__"
```
On Windows:
```
$ fpm build --profile release --flag "-D_MSC_VER -D_WIN32"
```
You can add *fortran-lmdb* as an FPM dependency:
```toml
[dependencies]
fortran-lmdb = { git = "https://github.com/interkosmos/fortran-lmdb.git" }
```
## Licence
ISC