linkerberkeley-dblnk2001

Linking C++ - BDB - LNK2001


BDB is compiled on the same PC, under same VS.

#include <db_cxx.h> int main(){ Db b(NULL, 0); return 0; }

1>main.obj : error LNK2001: unresolved external symbol ""public: virtual __thiscall Db::~Db(void)" (??1Db@@UAE@XZ)"

1>main.obj : error LNK2001: unresolved external symbol ""public: __thiscall Db::Db(class DbEnv *,unsigned int)" (??0Db@@QAE@PAVDbEnv@@I@Z)"

what could be wrong?


Solution

  • Did you remember to link in the binary created by compiling BDB?