See example-mdbx.c as an example of using libmdbx, and do a line-by-line comparison of it with the sample-bdb.txt file.