當前位置:首頁 » 比特幣問答 » vc編譯調試比特幣源碼pdf

vc編譯調試比特幣源碼pdf

發布時間: 2021-08-05 20:55:53

① 在VS2010的VC++中如何編譯、鏈接、運行、調試程序

在vc2010中看不到像VC6.0顯式的編譯、連接按鈕了。只有工具欄(啟動調試)和菜單欄(測試)

這些功能包含編譯、鏈接、運行(調試)所有步驟,都一鍵完成。

實際上這些功能是編譯器使用以下工具實現的:

編譯器CL.EXE,將.c/.cpp源代碼編譯成目標代碼.obj,

連接器LINK.EXE,將目標代碼和庫連接生成最終文件;

資源編譯器RC.EXE(.rc)將資源編譯,最終通過連接器存入最終文件.

注意編譯准備:VCVARS32.bat拷貝到當前的workspace下在cmd下執行之後就可以

直接使用這些編譯工具在cmd下編譯.

-----------------------------------------------------------

例子:記事本編輯hello.c,在按照上面要求拷貝到當前目錄下,打開cmd

CL.EXE /c hello.c只編譯不連接

LINK.EXE hello.obj 用到的庫文件,生成可執行文件.如:

LINK.EXE hello.obj user32.lib

RC.EXE Hello.rc

-----------------------------------------

CL.EXE,LINK.EXE,vcvars32.bat所在目錄:假定VS2010使用默認安裝路徑

C:Program FilesMicrosoft Visual Studio 10.0VCin

rc.exe所在路徑:

C:Program FilesMicrosoft SDKsWindowsv7.1ABin

注意:

(1)這些EXE文件在vs2010下可能存在多個不同路徑,但都是一樣的,可以通用

(2)如果電腦上安裝了不同的VS版本,這些文件會不同,注意區分。使用同一VS版本下的文件。

② 誰能成功編譯比特幣源碼

友情提醒一下:現在的比特幣基本上被開採到末段了。比特幣的程序原理決定了它越到後期生成間隔越長,所以現在生成一個比特幣的時間可能已經超過比特幣的價值了。畢竟還要考慮到挖礦電腦的功耗和時間等。雖然現在比特幣還是很火,但是現在才開始入手的話就有點遲了,不太可能賺到錢了。

③ vc如何快速調試出各代碼文件與軟體模塊的對應關系

1、在資源視圖中打開,看看是否能對應上,特別是對話框上的文字字樣是否對應。
2、然後根據該對話框的ID,查找、搜索在哪個CPP中使用。
3、多用在工程范圍內、多文件查找,很快能夠將實際界面和CPP、資源對應。這是個不二技巧。

④ 下面這段VC源碼怎麼編譯成一個應用程序呢

你這個是VC6的工程,裝個VC6或以上的VC就行啦,到裡面編譯就行了;不想安裝的話上傳到網路網盤,大家會幫你編譯的

⑤ 為什麼很多網上下載的VC源碼我編譯都會出錯

編譯器的版本一般是不會有沖突的。這種情況很正常呀,程序對語法要求是很嚴格的,容不得半點差錯,在網上下載源碼不能保證這一點啊。另外你下載的源碼不一定是完整的啊,有些只提供了一些局部的設計代碼,不是一個完整的工程啊,如果你自己有一定的基礎的話,建議你還是自己去分析一下代碼吧,可能會發現一些明顯的錯誤,更重要的是提高你的編程水平啊。其實光運行別人的程序,就算成功了好像也沒什麼意義,是吧,呵呵。最後祝你成功!你是初學者,我的水平也不高,但還是可以幫助你的。(學習體會:初學VC,容易走彎路,建議你還是下載一些視頻教學看看吧,對你快速入門非常有好處的。我就是走了好多彎路才過來的,幸好自己一直沒有放棄啊!!!)

⑥ vc編譯了一個exe文件,在別人機子上運行出錯,但是又不想把源碼靠在別人機子上調試!如何獲取出錯的函數

vc2005 vc2008吧?運行庫沒安裝吧。

⑦ 請問哪裡有windows平台C++的bitcoin源代碼下載,我想用VC來編譯。

很多朋友都知道如何在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
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
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圖形界面的錢包軟體)

⑧ 比特幣源代碼如何修改可以變成一個新的虛擬幣

不好意思
這個你修改不了
因為這個源代碼記錄了比特幣的一路發展過程以及開采過程中遇到的問題以及開采難易程度
有開源代碼才能挖礦所以沒有一個人能更改的了

⑨ vc++英文企業版sp6的完整版,編譯一個程序在程序的目錄里應該有調試版本Debug文件夾和release文件夾。

我有,是在xpsp3下的vc++6.0 sp6完整版

熱點內容
比特幣以太坊泰達幣的區別 發布:2025-07-02 01:04:27 瀏覽:23
ethzurichsystem 發布:2025-07-02 01:04:25 瀏覽:985
比特幣挖礦的說法 發布:2025-07-02 00:54:02 瀏覽:481
匯桔網成為區塊鏈備案企業 發布:2025-07-02 00:53:55 瀏覽:814
哲學元宇宙 發布:2025-07-02 00:51:59 瀏覽:247
vrt數字貨幣價格 發布:2025-07-02 00:39:33 瀏覽:117
異元次宇宙 發布:2025-07-02 00:36:30 瀏覽:976
礦機挖幣什麼是正規的 發布:2025-07-02 00:15:15 瀏覽:379
御銀股份為什麼是區塊鏈龍頭 發布:2025-07-01 23:45:43 瀏覽:747
eth杠桿交易是什麼時候發行的 發布:2025-07-01 23:35:41 瀏覽:641