c++visual-studiodllvisual-studio-2015berkeley-db

How can I use .dll or .lib Berkeley DB C++?


I cant connect the Berkeley DB C++ library to my VS 2015 project

  1. i download a project of Berkeley DB C++: link
  2. i run the Berkeley_DB_vs2015.sln project from the build_windows folder and compile it
  3. i get the folder x64 > Release and in it libdb_stl181.dll , libdb181.dll , libdb_stl181.lib, libdb181.lib, etc enter image description here

how can i use this library in other project? im tried:

#pragma comment(lib, "libdb181.lib")
#pragma comment(lib, "libdb_stl181.lib")

but i cant use:

#include <db_cxx.h>

and i cant use the library elements at all

im tried: "Add reference" in VS15 for add a .dll, but i get: "as it is not of a type or version current project can use")

also i tried to use "Additional Library Directories" but this didnt give any result

also, the installation via NuGet probably does not suit me, since I could not do:

#include <dbstl_map.h>

ideally, i want to use this

i was able to use this (after installation via NuGet):

#include <db_cxx.h>

but this way i cant insert, for example, STL objects

based on this, i probably dont need to use NuGet.


Solution

  • dbstl_map.h is in directory db-18.1.40\lang\cxx\stl.