首页 > 代码库 > 编译gitcoin

编译gitcoin

1. download bitcoin
git clone https://github.com/bitcoin/bitcoin.git

2. run autogen.sh
./autogen.sh

3. run configure
write a shell script ‘my-conf.sh‘ to run ‘configure‘ script:
MY_CURPATH=`pwd`
MY_LOCAL=${MY_CURPATH}/mylocal
PREFIX=${MY_LOCAL}

echo$MY_CURPATH
echo$MY_LOCAL

./configure --prefix=${PREFIX} \
  --enable-debug \
  --enable-werror \
  --with-gui \
  --with-incompatible-bdb

Some errors took place in the configure process:
1). configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)
   resolve method: add "--with-incompatible-bdb".

2). configure: error: Qt dependencies not found
   resolve method: sudo apt-get install libqt4-dev

3). checking for protoc... no
   configure: error: PROTOC not found
   resolve method: sudo apt-get install protobuf-compiler

4). continue to run ‘my-conf.sh‘. The result:
Options used to compile and link:
  with wallet   = yes
  with gui / qt = yes
    qt version  = 4
    with qr     = auto
  with zmq      = no
  with test     = yes
  with bench    = yes
  with upnp     = yes
  debug enabled = yes
  werror        = yes

  target os     = linux
  build os      =

  CC            = /usr/bin/ccache gcc
  CFLAGS        = -g -O2 -g3 -O0
  CPPFLAGS      =  -DDEBUG -DDEBUG_LOCKORDER -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = /usr/bin/ccache g++ -std=c++11
  CXXFLAGS      = -g -O2 -g3 -O0 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter
  LDFLAGS       =
  ARFLAGS       = cr

4. make
5. make instal

本文出自 “用C++写诗” 博客,谢绝转载!

编译gitcoin