Post
Topic
Board Development & Technical Discussion
Re: Building headless Bitcoin and Bitcoin-qt on Windows
by
old c coder
on 20/04/2014, 15:22:04 UTC
I followed this guide loosely and successfully compiled OpenSSL, BDB and Boost (compiling for the headless version, so no QT, protoc, libpng or qrencode needed). Then I set the appropriate include and library files in the gcc specs file, so that they could be found and ran autogen.sh and configure. All went well and a makefile was generated in the root directory, which I ran. It compiled all modules successfully and then tried to build bitcoind (I believe), outputting:
Code:
Making all in src
make[1]: Entering directory `/i/code/bitcoin_git/bitcoin/src'
make  all-recursive ...
This failed however with a host of errors (I included the head only, but I think the problem can be derived from this, as the other errors are very alike):
Code:
libbitcoin_server.a(main.o): In function `CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::WriteBatch()'
...
libbitcoin_server.a(txdb.o): In function `~CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
...
I checked if libleveldb.a and libmemenv.a were available, and they were (located at .../src/leveldb).

Could anyone point me in the right direction?
I followed the instructions to the letter and I'm having this same problem when linking bitcoind.exe.  Does anyone know what I'm missing here?

Hello operezm,

It looks like the linker-loader in gcc, is not finding the library libleveldb.a  So even though you built it, did gcc see a line like
-L"$(CURDIR)/leveldb" \ where $(CURDIR) is correct at the moment of linking?  I just took that line from nitrogenetics message #1 here
https://bitcointalk.org/index.php?topic=149479.0
in this forum, in the section Additional notes for Bitcoin 0.8.6

You get points for not being on drive c Grin

Ron