导航:首页 > 源码编译 > 比特币源代码编译出现boost

比特币源代码编译出现boost

发布时间:2023-01-13 23:17:49

A. 在Windows平台下怎么编译boost 1.57 for android

这里是使用NDK进行编译boost的但肯定对我有用吧。。经过一番折腾终于编译成功,,高兴,呵呵! 转载

下面将主要的过程记录下来:

1、下载boost 源码

Boost for Android

Boost for android is a set of tools to compile the main part of the Boost C++ Libraries for the Android platform.

Currently supported boost versions are 1.45.0, 1.48.0 and 1.49.0.

因此下载最新的 1.49 版本,下载完成后进行打补丁

2、下载补丁代码

boost-1_49_0

3、打补丁代码

boost_1_49_0.tar.bz2 放在android的 external 下解压

tar -xjvf external/boost_1_49_0.tar.bz2

将boost-1_49_0.patch放在external\boost_1_49_0下面根目录执行:

patch -Np1 -d external/boost_1_49_0 < external/boost_1_49_0/boost-1_49_0.patch

4、编写boost的makefile文件,即Android.mk

LOCAL_PATH:= $(call my-dir)

common_SRC_FILES := \
libs/thread/src/pthread/thread.cpp \
libs/thread/src/pthread/once.cpp \

common_SRC_FILES += \
libs/filesystem/v3/src/codecvt_error_category.cpp \
libs/filesystem/v3/src/operations.cpp \
libs/filesystem/v3/src/path.cpp \
libs/filesystem/v3/src/path_traits.cpp \
libs/filesystem/v3/src/portability.cpp \
libs/filesystem/v3/src/utf8_codecvt_facet.cpp \
libs/system/src/error_code.cpp \
libs/system/src/local_free_on_destruction \

include $(CLEAR_VARS)
LOCAL_MODULE:= libboost
LOCAL_SRC_FILES := $(common_SRC_FILES)

prebuilt_stdcxx_PATH := prebuilts/ndk/current/sources/cxx-stl/gnu-libstdc++

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/boost \
$(prebuilt_stdcxx_PATH)/include \
$(prebuilt_stdcxx_PATH)/libs/$(TARGET_CPU_ABI)/include/ \

LOCAL_C_INCLUDES += \
$(prebuilt_stdcxx_PATH)/include \
$(prebuilt_stdcxx_PATH)/libs/$(TARGET_CPU_ABI)/include/ \
$(prebuilt_supccxx_PATH)/include

LOCAL_CFLAGS += -fvisibility=hidden -lpthread
LOCAL_CPPFLAGS += -fexceptions -frtti

LOCAL_SHARED_LIBRARIES := libc libstdc++ libstlport

LOCAL_LDFLAGS += -L$(prebuilt_stdcxx_PATH)/libs/$(TARGET_CPU_ABI) -lgnustl_static -lsupc++

LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
比较重要的是上面 红色 部分文字

最后编译生成:

target thumb C++: libboost <= external/boost_1_49_0/libs/thread/src/pthread/thread.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/thread/src/pthread/once.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/codecvt_error_category.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/operations.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/path.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/path_traits.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/portability.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/filesystem/v3/src/utf8_codecvt_facet.cpp
target thumb C++: libboost <= external/boost_1_49_0/libs/system/src/error_code.cpp
target SharedLib: libboost (out/target/proct/godbox/obj/SHARED_LIBRARIES/libboost_intermediates/LINKED/libboost.so)
target Symbolic: libboost (out/target/proct/godbox/symbols/system/lib/libboost.so)
target Strip: libboost (out/target/proct/godbox/obj/lib/libboost.so)
Install: out/target/proct/godbox/system/lib/libboost.so

成功生成 libboost.so 库

B. 如何在windows平台下编译比特币bitcoin客户端

很多朋友都知道如何在linux平台如何编译比特币程序,但是,到了windows平台,
就会感觉到无从下手. 其实, 比特币程序是跨平台的.
你要编译windows版的比特币程序,基本上有两种方法,一种是在linux平台
(推荐ubuntu 13.10)通过交叉编译的方法来编译.另外一种,就是直接在windows平台编译.
我想,你既然要在windows平台使用,我就详细介绍一下如何在windwows平台编译比特币程序.
我的平台:windows7
第一步:安装变编译环境QT和MINGW,msys
1、msys是一个在windows平台模拟shell的程序。
下载安装程序之后,通过安装管理程序,按安装以下内容:
From MinGW installation manager -> All packages -> MSYS
选中以下安装包
msys-base-bin
msys-autoconf-bin
msys-automake-bin
msys-libtool-bin
点 apply changes开始安装。他会自动下载安装好。
需要注意的是,确保不要安装msys-gcc和msys-w32api ,因为这两个包和我们的编译系统发生冲突。
很多人出现一些莫名其妙的问题,就是因为这两个包。

2、安装 MinGW-builds
下载并解压缩 i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z 到C盘根目录 C:\
注意我的目录结构。你尽量和我一样。

3、设置PATH环境变量,将C:\mingw32\bin;添加到第一个。

4、在命令行模式下输入 gc -v 会得到以下内容
c:\gcc -v
Using built-in specs.
COLLECT_GCC=c:\mingw32\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.8.2/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-4.8.2/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-cloog=/c/mingw482/prerequisites/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='i686-posix-dwarf-rev3, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/include -I/c/mingw482/prerequisites/i686-zlib-static/include -I/c/mingw482/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/include -I/c/mingw482/prerequisites/i686-zlib-static/include -I/c/mingw482/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/lib -L/c/mingw482/prerequisites/i686-zlib-static/lib -L/c/mingw482/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
Thread model: posix
gcc version 4.8.2 (i686-posix-dwarf-rev3, Built by MinGW-W64 project)
至此,你的开发环境已经搭建好了,很简单吧

第二部分:下载bitcoin引用的外部库
我们把它们全部放在 C:\deps目录下

2.1 安装OpenSSL下载:
进入启动 MinGw shell 比如目录:(C:\MinGW\msys\1.0\msys.bat)运行这个msys.bat,就会启动一个shell环境,提示符是$
输入命令
cd /c/deps/
tar xvfz openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
Configure no-shared no-dso mingw
make
等待几分钟后,就把openssl编译好了。

2.2 下载Berkeley DB
我们推荐使用 4.8版本
同样在msys shell环境下输入以下命令
cd /c/deps/
tar xvfz db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
make
等待编译

2.3 安装Boost

msys命令:
cd C:\deps\boost_1_55_0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage

2.4 安装Miniupnpc
cd C:\deps\miniupnpc
mingw32-make -f Makefile.mingw init upnpc-static

2.5下载 protoc 和 libprotobuf:
msys shell命令
cd /c/deps/protobuf-2.5.0
configure --disable-shared
make
2.6 qrencode:
命令
cd /c/deps/libpng-1.6.10
configure --disable-shared
make
ode:
cd /c/deps/qrencode-3.4.3
LIBS="../libpng-1.6.10/.libs/libpng16.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.10" \
png_LIBS="-L../libpng-1.6.10/.libs" \
configure --enable-static --disable-shared --without-tools
make

2.7 安装 Qt 5 库
在 windows命令行输入:
set INCLUDE=C:\deps\libpng-1.6.10;C:\deps\openssl-1.0.1g\include
set LIB=C:\deps\libpng-1.6.10\.libs;C:\deps\openssl-1.0.1g
cd C:\Qt\5.2.1
configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -system-zlib -qt-pcre -no-icu -no-gif -system-libpng -no-libjpeg -no-freetype -no-angle -no-vcproj -openssl-linked -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug
mingw32-make
set PATH=%PATH%;C:\Qt\5.2.1\bin
cd C:\Qt\qttools-opensource-src-5.2.1
qmake qttools.pro
mingw32-make

3. 下载Bitcoin 0.9.1
在msys shell下输入以下命令行:
cp /c/deps/libpng-1.6.10/.libs/libpng16.a /c/deps/libpng-1.6.10/.libs/libpng.a
cd /c/bitcoin-0.9.1
./autogen.sh
CPPFLAGS="-I/c/deps/boost_1_55_0 \
-I/c/deps/db-4.8.30.NC/build_unix \
-I/c/deps/openssl-1.0.1g/include \
-I/c/deps \
-I/c/deps/protobuf-2.5.0/src \
-I/c/deps/libpng-1.6.10 \
-I/c/deps/qrencode-3.4.3" \
LDFLAGS="-L/c/deps/boost_1_55_0/stage/lib \
-L/c/deps/db-4.8.30.NC/build_unix \
-L/c/deps/openssl-1.0.1g \
-L/c/deps/miniupnpc \
-L/c/deps/protobuf-2.5.0/src/.libs \
-L/c/deps/libpng-1.6.10/.libs \
-L/c/deps/qrencode-3.4.3/.libs" \
./configure \
--disable-upnp-default \
--disable-tests \
--with-qt-incdir=/c/Qt/5.2.1/include \
--with-qt-libdir=/c/Qt/5.2.1/lib \
--with-qt-bindir=/c/Qt/5.2.1/bin \
--with-qt-plugindir=/c/Qt/5.2.1/plugins \
--with-boost-system=mgw48-mt-s-1_55 \
--with-boost-filesystem=mgw48-mt-s-1_55 \
--with-boost-program-options=mgw48-mt-s-1_55 \
--with-boost-thread=mgw48-mt-s-1_55 \
--with-boost-chrono=mgw48-mt-s-1_55 \
--with-protoc-bindir=/c/deps/protobuf-2.5.0/src
make
strip src/bitcoin-cli.exe
strip src/bitcoind.exe
strip src/qt/bitcoin-qt.exe

这样,你就得到了变异好的 bitcoin-cli.exe和bitcoind.exe ,bitcoin-qt.exe(windows QT图形界面的钱包软件)

C. 如何在windows平台下编译比特币bitcoin客户端

第一步:安装变编译环境QT和MINGW,msys
1、msys是一个在windows平台模拟shell的程序。

访问http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
下载安装程序之后,通过安装管理程序,按安装以下内容:
From MinGW installation manager -> All packages -> MSYS
选中以下安装包

msys-base-bin
msys-autoconf-bin
msys-automake-bin
msys-libtool-bin
点 apply changes开始安装。他会自动下载安装好。
需要注意的是,确保不要安装msys-gcc和msys-w32api ,因为这两个包和我们的编译系统发生冲突。
很多人出现一些莫名其妙的问题,就是因为这两个包。
2、安装 MinGW-builds
访问
http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/4.8.2/threads-posix/dwarf/i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z/download
下载并解压缩 i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z 到C盘根目录 C:\
注意我的目录结构。你尽量和我一样。

3、设置PATH环境变量,将C:\mingw32\bin;添加到第一个。
4、在命令行模式下输入 gc -v 会得到以下内容
c:\gcc -v
Using built-in specs.
COLLECT_GCC=c:\mingw32\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.8.2/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-4.8.2/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-mpfr=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-mpc=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-isl=/c/mingw482/prerequisites/i686-w64-mingw32-static --with-cloog=/c/mingw482/prerequisites/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='i686-posix-dwarf-rev3, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/include -I/c/mingw482/prerequisites/i686-zlib-static/include -I/c/mingw482/prerequisites/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/include -I/c/mingw482/prerequisites/i686-zlib-static/include -I/c/mingw482/prerequisites/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw482/i686-482-posix-dwarf-rt_v3-rev3/mingw32/opt/lib -L/c/mingw482/prerequisites/i686-zlib-static/lib -L/c/mingw482/prerequisites/i686-w64-mingw32-static/lib -Wl,--large-address-aware'
Thread model: posix
gcc version 4.8.2 (i686-posix-dwarf-rev3, Built by MinGW-W64 project)
至此,你的开发环境已经搭建好了,很简单吧

第二部分:下载bitcoin引用的外部库
我们把它们全部放在 C:\deps目录下
2.1 安装OpenSSL下载:http://www.openssl.org/source/openssl-1.0.1g.tar.gz
进入启动 MinGw shell 比如目录:(C:\MinGW\msys\1.0\msys.bat)运行这个msys.bat,就会启动一个shell环境,提示符是$
输入命令
cd /c/deps/
tar xvfz openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
Configure no-shared no-dso mingw
make

等待几分钟后,就把openssl编译好了。

2.2 下载Berkeley DB 访问: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
我们推荐使用 4.8版本
同样在msys shell环境下输入以下命令
cd /c/deps/
tar xvfz db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
make
等待编译

2.3 安装Boost,下载地址: http://sourceforge.net/projects/boost/files/boost/1.55.0/

msys命令:
cd C:\deps\boost_1_55_0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage

2.4 安装Miniupnpc 下载地址: http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz

cd C:\deps\miniupnpc
mingw32-make -f Makefile.mingw init upnpc-static

2.5下载 protoc 和 libprotobuf:
Download and unpack http://protobuf.googlecode.com/files/protobuf-2.5.0.zip
msys shell命令

cd /c/deps/protobuf-2.5.0
configure --disable-shared
make

2.6 qrencode:
下载地址: http://prdownloads.sourceforge.net/libpng/libpng-1.6.10.tar.gz?download
命令
cd /c/deps/libpng-1.6.10
configure --disable-shared
make

下载 http://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.gz ode:
cd /c/deps/qrencode-3.4.3

LIBS="../libpng-1.6.10/.libs/libpng16.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.10" \
png_LIBS="-L../libpng-1.6.10/.libs" \
configure --enable-static --disable-shared --without-tools

make

2.7 安装 Qt 5 库
下载和解压缩
http://download.qt-project.org/official_releases/qt/5.2/5.2.1/submoles/qtbase-opensource-src-5.2.1.7z
http://download.qt-project.org/official_releases/qt/5.2/5.2.1/submoles/qttools-opensource-src-5.2.1.7z
在 windows命令行输入:
set INCLUDE=C:\deps\libpng-1.6.10;C:\deps\openssl-1.0.1g\include
set LIB=C:\deps\libpng-1.6.10\.libs;C:\deps\openssl-1.0.1g

cd C:\Qt\5.2.1
configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -system-zlib -qt-pcre -no-icu -no-gif -system-libpng -no-libjpeg -no-freetype -no-angle -no-vcproj -openssl-linked -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug

mingw32-make

set PATH=%PATH%;C:\Qt\5.2.1\bin

cd C:\Qt\qttools-opensource-src-5.2.1
qmake qttools.pro
mingw32-make

3. 下载Bitcoin 0.9.1 地址: https://github.com/bitcoin/bitcoin/archive/v0.9.1.zip

在msys shell下输入以下命令行:
cp /c/deps/libpng-1.6.10/.libs/libpng16.a /c/deps/libpng-1.6.10/.libs/libpng.a

cd /c/bitcoin-0.9.1

./autogen.sh

CPPFLAGS="-I/c/deps/boost_1_55_0 \
-I/c/deps/db-4.8.30.NC/build_unix \
-I/c/deps/openssl-1.0.1g/include \
-I/c/deps \
-I/c/deps/protobuf-2.5.0/src \
-I/c/deps/libpng-1.6.10 \
-I/c/deps/qrencode-3.4.3" \
LDFLAGS="-L/c/deps/boost_1_55_0/stage/lib \
-L/c/deps/db-4.8.30.NC/build_unix \
-L/c/deps/openssl-1.0.1g \
-L/c/deps/miniupnpc \
-L/c/deps/protobuf-2.5.0/src/.libs \
-L/c/deps/libpng-1.6.10/.libs \
-L/c/deps/qrencode-3.4.3/.libs" \
./configure \
--disable-upnp-default \
--disable-tests \
--with-qt-incdir=/c/Qt/5.2.1/include \
--with-qt-libdir=/c/Qt/5.2.1/lib \
--with-qt-bindir=/c/Qt/5.2.1/bin \
--with-qt-plugindir=/c/Qt/5.2.1/plugins \
--with-boost-system=mgw48-mt-s-1_55 \
--with-boost-filesystem=mgw48-mt-s-1_55 \
--with-boost-program-options=mgw48-mt-s-1_55 \
--with-boost-thread=mgw48-mt-s-1_55 \
--with-boost-chrono=mgw48-mt-s-1_55 \
--with-protoc-bindir=/c/deps/protobuf-2.5.0/src

make

strip src/bitcoin-cli.exe
strip src/bitcoind.exe
strip src/qt/bitcoin-qt.exe

这样,你就得到了变异好的 bitcoin-cli.exe和bitcoind.exe ,bitcoin-qt.exe(windows QT图形界面的钱包软件)

D. 比特币大家了解过吗

我做了好几个月了,可以肯定的说非常靠谱!现在比特币超过2万美金了,以后应该会上涨到10万美金。也就是说,现在免费赚的比特币还可以享受升值。通过我的链接注册https://cryptotabbrowser.com/20800059

我已经提款超过5次,绝对没问题,所以我现在已经购买了5倍的boost,赚起来超快,我现在每小时差不多9600HS/h!

第一步:通过链接下载安装浏览器(链接如下)https://cryptotabbrowser.com/20800059

第二步:打开CryptoTab主页,点击蓝色 DOWNLOAD CRYPTOTAB BROWSER ,下载完成后安装即可。(目前普遍浏览器都有网页翻译功能,方便您浏览。)



第六步:显示下图说明登录成功了。只要保持CryptoTab一直打开就能一直挖矿了~

当您的产量到达0.00001BTC后点击左/右角的三条杠。(手机和电脑略有不同)


第七步:由于刚提现一次,目前还不够最低提现额度,所以接下来的界面没有截图,大家只需要输入您的BTC地址,提币数量,点击人机验证即可跳转啦。


本文来源:andehui的网赚博客

本文地址:http://honeygain.cn/2020/11/468/

版权声明:转载请注明Honeygain.cn

E. windows 怎么安装boost

先从官网(www.boost.org)下载最新版的BOOST源码,如图所示

我这里下的是zip的那个
第2步:
编译源代码(放心.这里是傻瓜式的操作,很容易操作)
(1)先把源代码放在E盘,例如 E:oost_1_53_0
(2)在源代码中找到一个批处理bootstrap.bat,运行即可
此时会弹出Building Boost.Jam之类,过一会之后,源代码中新增了1个文件bjam.exe
(3)运行bjame.exe即能编译了(花费时间很长,大概20分

F. VS2013 boost.python 编译错误,请教一下

  1. 确认文件boost/python.hpp存在

  2. #include包含语句,应该放在源文件首部,其它代码之前(其它#include之后)

  3. 尝试增加作用域定义:

using namespace boost::python;

G. 怎样在TP钱包币安生态链开发虚拟货币

具体可以参考以下步骤:
1.第一步:准备编译环境。代码都是需要编译的,因此需要准备编译环境和工具,您需要下载mingw(仿linux环境编译工具)、qtcreator和对应的sdk,下载boost1.5.0(需要依赖库)、openssl、伯克利db、miniupnp;配置好系统环境变量,qt环境,使用mingw编译boost库(这个需要编译大概2个小时),openssl、伯克利db、miniupnp等文件,编译命令在ltc源代码里的mingw-unix文件里有详细说明。
2.第二步:编译widows钱包。从github下ltc源代码。
3.第三步:调整参数,生成属于你的山寨币。还是在qtcreator打开各个源文件,找到对应的地方调整参数即可。

H. 新人求教 驱动源码编译安装

1、安装scons
(1) 下载python2.7, 使用x86_32位,因为scons只有32位安装包可用;
(2) 下载scons2.3.0;
(3) 安装python 和 scons, 将C:\Python27\Scripts写入PATH;
(4) 下载安装pywin32 ,It is recommended you install pywin32 if you want to do parallel builds (scons -j)

2、安装boost库(1.49版本).
解压后双击bootstrap.bat,生成bjam.exe后,cd到目录c:\boost下,(将boost_1_49更名为boost了)编译boost。
编译命令:C:\boost>bjam variant=release --with-filesystem --with-thread --with-date_time --with-program_options threading=multi toolset=msvc-10.0 link=static runtime-link=static address-model=32
这是使用VS2010环境编译的release版本,编译完成后,生成C:\boost\stage\lib文件夹,下面有6个lib库:

如果要编译成debug版本,使用命令:bjam variant=debug --with-filesystem --with-thread --with-date_time --with-program_options threading=multi toolset=msvc-10.0 link=static runtime-link=static address-model=32

编译完成后,生成C:\boost\stage\lib文件夹,下面有10个lib库和dll:

此处为MongoDB文档中对于编译boost库的要求原文:
When using bjam, MongoDB expects
variant=debug for debug builds, and variant=release for release builds
threading=multi
link=static runtime-link=static for release builds
address-model=64 for 64 bit(64位的话,把32换为64)。link=static runtime-link=static,boost需要编译成静态库,因为mongodb只会去链接boost的静态库
address-model=64在win7 64环境下此项必须,不加在编译mongodb的c++ client时会出现链接错误。

3、下载mongo2.4.6源码 http://www.mongodb.org/downloads官网下载
编译Mongoclient.lib

cmd命令提示符下,cd到解压后的文件目录,例如我放在了E盘,E:\mongodb-src-r2.4.6,输入命令:
scons –-dd --32 mongoclient.lib // build C++ client driver library
Add --64 or --32 to get the 64- and 32-bit versions, respectively. Replace --release with --dd to build a debug build.
编译后在mongodb\build\win32\32\dd\client_build\生成mongoclient.lib.

4、测试程序
就用Mongodb自带的例子吧,使用VS2010打开E:\mongodb-src-r2.4.6\src\mongo\client\examples中的simple_client_demo.vcxproj,编译,会提示生成simple_client_demo.sln,保存。
使用debug模式,配置工程环境:打开工程->属性,配置Configuration Properties下的VC++ Directories,头文件路径添加C:\boost,Lib库路径添加boost的lib,以及mongodb client的lib:
C:\boost\stage\lib

E:\mongodb-src-r2.4.6\build\win32\32\dd\client_build
进入C/C++下面的Code Generation,将Runtime Library设置为Multi-threaded Debug (/MTd)
进入Linker下面的Input,设置Additional Dependencies,添加ws2_32.lib,psapi.lib,Dbghelp.lib,mongoclient.lib
将E:\mongodb-src-r2.4.6\build\win32\32\dd\mongo\base下生成的error_codes.h和error_codes.cpp文件,拷贝到E:\mongodb-src-r2.4.6\src\mongo\base目录下。
ok,编译、运行.

5、问题解决
error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj
1>mongoclient_d.lib(dbclient.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj
1>mongoclient_d.lib(assert_util.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj
1>mongoclient_d.lib(jsobj.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj
1>mongoclient_d.lib(status.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj
1>mongoclient_d.lib(mutexdebugger.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in error_codes.obj

VS的版本不匹配,lib是在更高级的版本中编译生成的,而使用的时候,是在低级版本中使用的,所以出现了不匹配的错误。例如,我在VS2010 SP1和VS2012的环境下编译的,而使用是在VS2010上使用,所以在编译时,出现了以上问题。

1>mongoclient.lib(stacktrace.obj) : error LNK2001: unresolved external symbol __imp_SymCleanup
1>mongoclient.lib(stacktrace.obj) : error LNK2001: unresolved external symbol __imp_SymGetMoleInfo64
1>mongoclient.lib(stacktrace.obj) : error LNK2001: unresolved external symbol __imp_SymInitialize
1>mongoclient.lib(stacktrace.obj) : error LNK2001: unresolved external symbol __imp_StackWalk64
1>mongoclient.lib(stacktrace.obj) : error LNK2001: unresolved external symbol __imp_SymFromAddr

在工程依赖库中添加Dbghelp.lib

其它问题,看看你手头的编译器、编译出来的boost库版本、mongoclient.lib的版本,是否对应好了。

I. RPM和boost是什么意思

RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”

rpm 执行安装包
二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作为后缀名。
Boost库是一个经过千锤百炼、可移植、提供源代码的C++库,,作为标准库的后备,是C++标准化进程的发动机之一。 Boost库由C++标准委员会库工作组成员发起,其中有些内容有望成为下一代C++标准库内容。在C++社区中影响甚大,其成员已近2000人。 Boost库为我们带来了最新、最酷、最实用的技术,是不折不扣的“准”标准库。可从 sourceforge.net/...d=7586下载安装boost库。大部分boost库功能的使用只需包括相应头文件即可,少数(如正则表达式库,文件系统库等)需要链接库。里面有许多具有工业强度的库,如graph库。Boost中比较有名气的有这么几个库:Regex正则表达式库SpiritLL parser framework,用C++代码直接表达EBNFGraph图组件和算法Lambda在调用的地方定义短小匿名的函数对象,很实用的functional功能concept check检查泛型编程中的conceptMpl用模板实现的元编程框架Thread可移植的C++多线程库Python把C++类和函数映射到Python之中Pool内存池管理smart_ptr5个智能指针,学习智能指针必读,一份不错的参考是来自CUJ的文章:Smart Pointers in Boost,哦,这篇文章可以查到,CUJ是提供在线浏览的。中文版见笔者在《Dr.Dobb's Journal软件研发杂志》第7辑上的译文。Boost总体来说是实用价值很高,质量很高的库。并且由于其对跨平台的强调,对标准C++的强调,是编写平台无关,现代C++的开发者必备的工具。但是Boost中也有很多是实验性质的东西,在实际的开发中实用需要谨慎。

J. boost最新版1.48.我想分析下里面的asio的源代码,该如何做,我在windows下,应该用什么编译器

微软的C++编译器即可.

阅读全文

与比特币源代码编译出现boost相关的资料

热点内容
gcc编译vi文件 浏览:61
安卓连airpods怎么找耳机 浏览:925
加密货币转账教程 浏览:227
程序员小灰hashmap 浏览:836
国语pdf版 浏览:182
少儿编程作品美丽的小房子 浏览:970
服务器卡在网页上怎么办 浏览:54
用python自制编译器 浏览:951
android分享新浪微博客户端 浏览:26
系统中服务器在哪里下载地址 浏览:1001
新a4安卓手机怎么投屏 浏览:173
pdftoemf 浏览:886
java接口可以实现接口吗 浏览:59
vb编程10个随机函数 浏览:21
程序员个人简介100 浏览:772
土木工程师算法工程师 浏览:92
javaexcel导入oracle 浏览:880
如何设置异地服务器 浏览:882
为什么安卓手机蓝牙耳机不会弹窗 浏览:547
linuxf77编译器安装教程 浏览:949