Post
Topic
Board Development & Technical Discussion
Re: Building headless Bitcoin and Bitcoin-qt on Windows
by
presstab
on 23/04/2014, 16:07:33 UTC
Getting this error when building hobonickels.   Not quite sure what to do now, some googling says something about libraries being out of order but I don't think this is the problem.

Code:
./build\db.o:db.cpp:(.text+0x21e): undefined reference to `DbEnv::DbEnv(unsigned
 int)'
./build\db.o:db.cpp:(.text+0x18d6): undefined reference to `DbEnv::close(unsigne
d int)'
./build\db.o:db.cpp:(.text+0x18f7): undefined reference to `DbEnv::DbEnv(unsigne
d int)'
./build\db.o:db.cpp:(.text+0x190d): undefined reference to `DbEnv::remove(char c
onst*, unsigned int)'
./build\db.o:db.cpp:(.text+0x1918): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1927): undefined reference to `DbEnv::strerror(int)
'
./build\db.o:db.cpp:(.text+0x1947): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x19a6): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1a40): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1db9): undefined reference to `DbEnv::set_lg_dir(ch
ar const*)'
./build\db.o:db.cpp:(.text+0x1e0b): undefined reference to `DbEnv::set_cachesize
(unsigned int, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1e1c): undefined reference to `DbEnv::set_lg_bsize(
unsigned int)'
./build\db.o:db.cpp:(.text+0x1e2d): undefined reference to `DbEnv::set_lg_max(un
signed int)'
./build\db.o:db.cpp:(.text+0x1e3e): undefined reference to `DbEnv::set_lk_max_lo
cks(unsigned int)'
./build\db.o:db.cpp:(.text+0x1e4f): undefined reference to `DbEnv::set_lk_max_ob
jects(unsigned int)'
./build\db.o:db.cpp:(.text+0x1e89): undefined reference to `DbEnv::set_errfile(_
iobuf*)'
./build\db.o:db.cpp:(.text+0x1eb3): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x1ecc): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x1ee5): undefined reference to `DbEnv::log_set_confi
g(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1f09): undefined reference to `DbEnv::open(char con
st*, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1fcc): undefined reference to `DbEnv::strerror(int)
'
./build\db.o:db.cpp:(.text+0x23f3): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2540): undefined reference to `DbMpoolFile::set_fla
gs(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x280b): undefined reference to `DbEnv::set_cachesize
(unsigned int, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x281c): undefined reference to `DbEnv::set_lg_bsize(
unsigned int)'
./build\db.o:db.cpp:(.text+0x282d): undefined reference to `DbEnv::set_lg_max(un
signed int)'
./build\db.o:db.cpp:(.text+0x283e): undefined reference to `DbEnv::set_lk_max_lo
cks(unsigned int)'
./build\db.o:db.cpp:(.text+0x284f): undefined reference to `DbEnv::set_lk_max_ob
jects(unsigned int)'
./build\db.o:db.cpp:(.text+0x2868): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x2881): undefined reference to `DbEnv::log_set_confi
g(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x28a2): undefined reference to `DbEnv::open(char con
st*, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x2ab2): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2ada): undefined reference to `Db::verify(char cons
t*, char const*, std::ostream*, unsigned int)'
./build\db.o:db.cpp:(.text+0x2b2c): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x2bf2): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x2df8): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2e24): undefined reference to `Db::verify(char cons
t*, char const*, std::ostream*, unsigned int)'
./build\db.o:db.cpp:(.text+0x2e48): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x3266): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x33ad): undefined reference to `DbTxn::abort()'
./build\db.o:db.cpp:(.text+0x3472): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x3637): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x3657): undefined reference to `DbEnv::lsn_reset(cha
r const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x36e4): undefined reference to `DbEnv::dbremove(DbTx
n*, char const*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x396e): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x3af1): undefined reference to `Dbt::Dbt()'
./build\db.o:db.cpp:(.text+0x3af9): undefined reference to `Dbt::Dbt()'
./build\db.o:db.cpp:(.text+0x3b27): undefined reference to `Dbc::get(Dbt*, Dbt*,
 unsigned int)'
./build\db.o:db.cpp:(.text+0x3c24): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3c2f): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3dae): undefined reference to `Dbt::Dbt(void*, unsi
gned int)'
./build\db.o:db.cpp:(.text+0x3ddb): undefined reference to `Dbt::Dbt(void*, unsi
gned int)'
./build\db.o:db.cpp:(.text+0x3e1f): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3e2a): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3f37): undefined reference to `Dbc::close()'
./build\db.o:db.cpp:(.text+0x4030): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x4052): undefined reference to `Db::remove(char cons
t*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x406e): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x409b): undefined reference to `Db::rename(char cons
t*, char const*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x40b1): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x40bc): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x40eb): undefined reference to `Dbc::close()'
./build\db.o:db.cpp:(.text+0x41d4): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x41e3): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x423a): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x424c): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x42a1): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x42ac): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x43f9): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x44ba): undefined reference to `DbEnv::lsn_reset(cha
r const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x4550): undefined reference to `DbEnv::log_archive(c
har***, unsigned int)'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\db.o: bad reloc address 0x6c4 in section `.gcc_except_table'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:290: recipe for target 'release\HoboNickels-qt.exe' failed
mingw32-make: *** [release\HoboNickels-qt.exe] Error 1


EDIT I found an error in my qt.pro file where I had deleted two lines. This removed the problem.

Also it is worth mentioning that the instructions to build boost on this thread caused troubles later on - I had to go back and build boost and add --with-regex and that the Berkely database did not come with libdb_cxx.a - so I had to build a prior version of the database and has to place libdb_cxx.a into i686-w64-mingw32/4.8.2/ folder in order to get passed cxx errors.