Bitcoin Forum
May 21, 2019, 08:18:51 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 3 4 5 6 7 »
1  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: August 10, 2015, 08:08:36 PM
Can you post your gcc -v output?
2  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: August 04, 2015, 03:12:58 PM
Code:
c:\lite>mingw32-make -f Makefile.Release
cd C:/lite/src/leveldb && CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE mingw
32-make OPT="-pipe -fno-keep-inline-dllexport -U_FORTIFY_SOURCE -D_FORTIFY_SOURC
E=2 -O2" libleveldb.a libmemenv.a && ranlib C:/lite/src/leveldb/libleveldb.a &&
ranlib C:/lite/src/leveldb/libmemenv.a
'CC' is not recognized as an internal or external command,
operable program or batch file.
Makefile.Release:313: recipe for target 'c:/lite/src/leveldb/libleveldb.a' faile
d
mingw32-make: *** [c:/lite/src/leveldb/libleveldb.a] Error 1

c:\lite>

Did you comment out win32 genleveldb.commands from your .pro file (leveldb will need to be built separately)? See "additional notes for older Bitcoin 0.8.6" on first post.
3  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: July 29, 2015, 04:54:34 PM
Hey guys, I've followed all the steps and still stuck on something related to the Berkeley DB.

When I run configure it says:

"checking for Berkeley DB C++ headers... no"
"configure: error: libdb_cxx headers missing"

Also, was wondering in the instructions, in the Berkeley DB part, why are we building under "build_unix", rather than "build_windows"?

Thanks.

Are you including the correct bdb folder when configuring? Did bdb compile fine?
Since we are compiling on a "unix like" system (msys) we build under build_unix. build_windows assumes you are building on visual studio.



yes, its all installed and configured. heres a screenshot of that folder, the file lrelease.exe doesent seem to exist?


Did you compile qt 4.8.6 from source? See "Compile bitcoin-qt 0.8.6 with Qt 4.8" on first post.


In step 2.4  miniupnpc-1.9.20150206.tar.gz does not include miniupnpcstrings.h and it looks for this file on make. So You have to create the file and put in something like:

Code:
/* $Id: miniupnpcstrings.h,v 1.3 2009/06/04 09:05:56 nanard Exp $ */
/* Project: miniupnp
 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * Author: Thomas Bernard
 * Copyright (c) 2005-2009 Thomas Bernard
 * This software is subjects to the conditions detailed
 * in the LICENCE file provided within this distribution */
#ifndef __MINIUPNPCSTRINGS_H__
#define __MINIUPNPCSTRINGS_H__

#define OS_STRING "OpenBSD/4.3"
#define MINIUPNPC_VERSION_STRING "1.3"

#endif

miniupnpcstrings.h will be automatically generated when compiling from cmd on windows as specified at step 2.4. You will need to manually create it if compiling from msys (or when crosscompiling on linux for windows, if I remember correctly).

I also had a nasty error that said that it couldn't find the entry point of a throw exception in libstdc++-6.dll in both the QT compilation and the protobuf compilation. I found that I had to delete libstdc++.dll inside of C:\mingw32\lib\gcc\i686-w64-mingw32\4.9.2 because it was trying to link against a different version of std c++ lib which already exists as libstdc++-6.dll inside of C:\mingw32\bin

Sounds like a misconfiguration (old toolchain version remnants?) of your build environment, or lack of make clean when rebuilding dependencies. Also make sure all dependencies are built by the same toolchain.
4  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: June 30, 2015, 10:35:25 PM
Last time I checked the build system was not yet qt 5.4 aware.
Have a look at https://github.com/theuni/bitcoin/commits/qt54

Any specific reason to compile it shared?
5  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: June 20, 2015, 01:21:29 PM
Thanks, nitrogenetics for keeping this guide updated; it did help me track down an issue trying to compile a coin based on Bitcoin 0.8. Though I noticed a few things that probably should be noted from the shift to version "L" of OpenSSL 1.0.1 from version "J":
Not so up to date, but still working. In the next update I'll replace msys with msys2 Wink

In the 0.8 headless client modifications to the "makefile.mingw" file, you still have references to "openssl-1.0.1j" that should be updated to "openssl-1.0.1l".
As specified, openssl v1.0.1k and later may lead to consesus forks when used with older unpatched bitcoin code releases. http://sourceforge.net/p/bitcoin/mailman/message/33221963/

Also, when compiling OpenSSL (step 2.1) after running the "./Configure" command, the output from that command suggests running "make depend" first, before running "make", which should probably be part of the instructions? My compile of OpenSSL actually failed out, while parsing the "test" directory (ideatest.c:1:1: error: expected identifier or '(' before '.' token, ../crypto/idea/ideatest.c), but all the source files got properly built before that, so it didn't affect final compilation. Is there a flag to turn off running tests of OpenSSL?
Openssl always suggest doing a make depend when disabling algorithms. Configure options are the same as in https://github.com/bitcoin/bitcoin/blob/master/depends/packages/openssl.mk, so they should be well tested.
Tests should not run unless you do a make test.

Its mentioned a few times to make sure various things are on in your PATH variable, and an example is shown in the compiling the GUI/Qt step of how to do that in the command prompt, but it's not shown for the MSYS shell; it might be useful to spell it out specifically that to add the MinGW binaries to your PATH in MYSYS, do:

Code:
PATH=/c/mingw32/bin:$PATH

But to add them to your PATH in a standard command prompt (which is needed for compiling the QT 4.8 library), do:

Code:
set PATH=C:\mingw32\bin;%PATH%
Msys will automatically set environment variables from the current windows setup, so just adding your toolchain bin folder to windows PATH should be enough.
When using qt5 submodules after compiling the base package a 'set PATH=%PATH%;C:\Qt\5.3.2\bin' will be needed in order to have qmake, lrelease, etc available for qt-tools build.
This is not necessary for qt4.8 (available as full package only).

Also, compiling QT 4 requires Perl be installed; my Windows 8.1 box didn't have that by default, so a link to http://www.activestate.com/activeperl might be useful.
Perl will only be required when compiling qt with qt-webkit enabled.

You mention commenting out the "genleveldb.commands" in the "bitcoin.pro" project file, but if you do that, you should probably also comment out the "QMAKE_CLEAN" line, which attempts to delete the "libleveldb.a" file when a "clean" action is run.
Yes, qmake clean will fail for leveldb and can be probably commented out also (doesn't make a big difference, whereas genleveldb.commands would stop the build process).
6  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: April 30, 2015, 06:38:44 PM
Given that, I used a solution from StackExchange:
Code:
ACLOCAL_PATH=/usr/share/aclocal ./autogen.sh
in the bitcoin directory and that avoided the PKG_... errors during the execution of ./configure.

You are actually setting ACLOCAL_PATH to the default search path.
Code:
$ aclocal --print-ac-dir
/usr/share/aclocal

ACLOCAL_PATH is ignored by msys-autoconf (afaik), this is why pkg.m4 needs to be installed to /usr/share/aclocal (--prefix=/usr when configuring).
7  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: April 28, 2015, 08:08:47 PM
i had pkg installed earlier as i did it with gpuminer. (copy paste bin/share folders)
now installed pkg again as you told above and now there is one error line less..
 but still this:

./configure: line 21247: syntax error near unexpected token `QTPLATFORM,'
./configure: line 21247: `        PKG_CHECK_MODULES(QTPLATFORM, Qt5PlatformSuppo
rt, QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS")'

edit, solved
to mingw32 folder:
************************
** Install pkg-config **
************************
1. Visit http://www.gtk.org/download/win32.php
2. Search for a version of pkg-config that includes both the Tool and Dev downloads
3. Click and download both the Tool link and the Dev link
4. Open the pkg-config zip file and extract the bin folder to C:\mingw32
5. Open the pkg-config-dev zip file and extract the share folder to C:\mingw32
http://sourceforge.net/projects/pkgconfiglite/files/0.28-1/pkg-config-lite-0.28-1.tar.gz/download
Code:
configure --prefix=/usr && make && make install
I was unable to make autoreconf include m4 files from folders other than /usr/share/aclocal, so I configured it to be installed to /usr.

Either installing pkg-config-lite with
Code:
configure --prefix=/usr && make && make install
or copying pkg.m4 from source package to aclocal folder will work. Just make sure it gets installed to C:\MinGW\msys\1.0\share\aclocal\pkg.m4

As an additional option you can switch to msys2.

I'll try to do my best to get the op updated asap.
8  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: April 27, 2015, 08:05:24 PM
Code:
checking for QtDBus... no
./configure: line 21329: syntax error near unexpected token `QTPLATFORM,'
./configure: line 21329: `        PKG_CHECK_MODULES(QTPLATFORM, Qt5PlatformSuppo
rt, QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS")'

Pierre-Louis@Bellatrix /f/dev/Worldcoin_core/1rc3/bitcoin
$ pkg-config --version
0.28

I tried copying the files from pkg-config dev/tool, compiled/installed pkg-config-lite, reran autogen.sh, started another msys, rebooted even, but still configure gives me this error (0.10.1rc3).  Is it possible there's an environment variable missing (like qtplatform_libs or something)?

Running pkg-config gives me the right version number so I'm assuming it's installed correctly.  Any suggestions? Thanks. Smiley


Copying pkg.m4 to C:\MinGW\msys\1.0\share\aclocal (or whatever your msys install folder is) should fix it.

Also make sure the mingw, and toolchain bin paths are BOTH in your PATH variable(for me, C:\MinGW\bin and C:\MinGW\mingw32\bin), although im sure if you got this far already they likely are.

This is not necessary. In a properly configured environment you will have no C:\MinGW\mingw32\bin folder and C:\MinGW\bin will just contain mingw-get executable.
9  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: February 11, 2015, 11:50:17 PM
i had pkg installed earlier as i did it with gpuminer. (copy paste bin/share folders)
now installed pkg again as you told above and now there is one error line less..
 but still this:

./configure: line 21247: syntax error near unexpected token `QTPLATFORM,'
./configure: line 21247: `        PKG_CHECK_MODULES(QTPLATFORM, Qt5PlatformSuppo
rt, QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS")'

edit, solved
to mingw32 folder:
************************
** Install pkg-config **
************************
1. Visit http://www.gtk.org/download/win32.php
2. Search for a version of pkg-config that includes both the Tool and Dev downloads
3. Click and download both the Tool link and the Dev link
4. Open the pkg-config zip file and extract the bin folder to C:\mingw32
5. Open the pkg-config-dev zip file and extract the share folder to C:\mingw32

pkg-config-lite worked fine for me, did you re-run autogen.sh after installing?



@nitro. Need an help.
Have compiled all as stated here for qtwebkits(icu-opensll and qt)

-Added to path:
C:\Python34;C:\Ruby21\bin;C:\Perl\site\bin;C:\Perl\bin;

-From CMD:
set PATH=%PATH%;C:\Qt\5.3.2\qtbase\bin\qmake   with "normal" 5.3.2 i write only set PATH=%PATH%;C:\Qt\5.3.2\bin, now i have to add \qtbase\bin\qmake to find .qmake.

-When i launch qmake,it will stop saying:
file ICUIN54.dll was not found on computer. (so,there something missing with icu i suppose)

That's sound strange cause i have already compiled via shell icu. Is something i miss? need to add to path something regarding icu files?

Thanks in advance.

Make sure icu is in PATH before building qt:
Code:
set PATH=%PATH%;C:\deps\icu\dist\lib
10  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: February 10, 2015, 05:59:26 PM
Thanks for the kind words cinnamon_carter Wink

Gitian builds are basically a cross compile for windows on ubuntu, you can see what is going on by having a look at contrib/gitian-descriptors and depends/packages:
https://github.com/bitcoin/bitcoin/tree/master/contrib/gitian-descriptors
https://github.com/bitcoin/bitcoin/tree/master/depends/packages
11  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: February 09, 2015, 10:27:06 PM
For anyone experiencing make freezing during parallel (-j) builds - I'd recommend using MSYS2 (http://sourceforge.net/projects/msys2/) as the shell because it doesn't have the bug.

I wasn't very impressed when I first tried it more than a year ago, but I had a look at the current MSYS2 version and it seems to be working really fine with no broken parallel builds. (Having pacman from Arch is a nice additional feature too). I think I will update the opening post soon.
12  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: February 09, 2015, 10:25:20 PM
getting some errors with 10.99 master(windows), last time it was fine to compile(2 weeks ago..)

./configure: line 16350: PKG_PROG_PKG_CONFIG: command not found

./configure: line 21247: syntax error near unexpected token `QTPLATFORM,'
./configure: line 21247: `        PKG_CHECK_MODULES(QTPLATFORM, Qt5PlatformSuppo
rt, QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS")'

solution, roll back: 
Remove custom pkg.m4 script.
master    (#5688)


It seems it would probably be a better option to install pkg-config:
http://sourceforge.net/projects/pkgconfiglite/files/0.28-1/pkg-config-lite-0.28-1.tar.gz/download
Code:
configure --prefix=/usr && make && make install
I was unable to make autoreconf include m4 files from folders other than /usr/share/aclocal, so I configured it to be installed to /usr.
13  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: February 08, 2015, 06:56:45 PM

Link fixed, thanks for reporting.


Anyone knows how to compile QTWEBKIT in windows?
Some qt that have webbrowser integrated,got qtwebkit widget in .pro file,but first it need to be compiled in windows.

Thanks.

See: https://bitcointalk.org/index.php?topic=149479.msg9836596#msg9836596


14  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: January 26, 2015, 03:22:31 PM
Hi Anyone know where I can get a tutorial on compiling a wallet ( not constructing one ) from source code on windows 8.  thx

See first post.


Error at "autogen.sh"

Can you paste the error message?
15  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: January 11, 2015, 04:09:46 PM
patched has_binary_operator.hpp (first manually added #endif at end of line 25 with a space between .hpp and #endif, then patched)
Not sure what you mean, but as I said you need to wrap has_binary_operator.hpp in a #ifndef Q_MOC_RUN. Just insert #ifndef Q_MOC_RUN at line 8 and #endif at the end of the file:

Code:
--- has_binary_operator.hpp Thu Oct 30 11:47:21 2014
+++ has_binary_operator.hpp Mon Jan 05 23:58:51 2015
@@ -6,6 +6,7 @@
 //
 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
 
+#ifndef Q_MOC_RUN
 #include <boost/config.hpp>
 #include <boost/type_traits/ice.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -227,3 +228,4 @@
 #endif
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
+#endif

Tuxcoin compiles fine after patching has_binary_operator.hpp. See tuxcoin-qt.pro diff:
Code:
--- tuxcoin-qt.pro Fri Jan 02 22:11:31 2015
+++ tuxcoin-qt.pro Sun Jan 11 16:54:29 2015
@@ -8,6 +8,7 @@
 DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
 CONFIG += no_include_pwd
 CONFIG += thread
+CONFIG += static
 
 
 
@@ -38,15 +39,17 @@
 
 
 win32 {
-    BOOST_LIB_SUFFIX=-mgw48-mt-s-1_55
-    BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
-    BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
+    BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57
+    BOOST_INCLUDE_PATH=C:/deps/boost_1_57_0
+    BOOST_LIB_PATH=C:/deps/boost_1_57_0/stage/lib
     BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
     BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
-    OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1g/include
-    OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1g
+    OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1j/include
+    OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1j
     MINIUPNPC_INCLUDE_PATH=C:/deps/
     MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
+    QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.4
+    QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.4/.libs
 }
 OBJECTS_DIR = build
 MOC_DIR = build
@@ -79,7 +82,7 @@
 # on Windows: enable GCC large address aware linker flag
 win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
 # i686-w64-mingw32
-win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
+#win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
 
 # use: qmake "USE_QRCODE=1"
 # libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
@@ -100,7 +103,7 @@
     count(USE_UPNP, 0) {
         USE_UPNP=1
     }
-    DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
+    DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB
     INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
     LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
     win32:LIBS += -liphlpapi

16  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: January 10, 2015, 06:45:46 PM
Assuming you are installing from scratch marking msys-base-bin, msys-autoconf-bin, msys-automake-bin and msys-libtool-bin for installation will provide everything you need.
17  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: January 05, 2015, 11:08:11 PM
Anyone having problems linking with libQt5Gui.a?
I'm using 64bit binaries and have built the steps leading up to Qt qttools-opensource-src-5.3.2 with no issues.  The link for Qtdiag.exe doesn't seem to want to work.  I'm not an expert at this but know the basics and have managed to get up to here with no errors.  I've followed the current instructions as they are (great guide btw!).

I'm wondering how many have actually installed using 64bit.  My next step will be to try with 32 if I can't get this resolved.  Google searches show a similar problem but so far none resolved.


It has been a while since I did a 64bit build. I'll give it a try and report back.


Can you be more specific & detail as to what needs to change in has_binary_operator.hpp

Try wrapping has_binary_operator.hpp code inside an #ifndef Q_MOC_RUN statement:
Code:
--- has_binary_operator.hpp Thu Oct 30 11:47:21 2014
+++ has_binary_operator.hpp Mon Jan 05 23:58:51 2015
@@ -6,6 +6,7 @@
 //
 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
 
+#ifndef Q_MOC_RUN
 #include <boost/config.hpp>
 #include <boost/type_traits/ice.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -227,3 +228,4 @@
 #endif
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
+#endif
18  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: January 03, 2015, 04:54:01 PM
Thanks, much appreciated Wink

You can find more info about BOOST_JOIN error here: https://bugreports.qt-project.org/browse/QTBUG-22829
I successfully used the suggested workaround of wrapping has_binary_operator.hpp inside an #ifndef Q_MOC_RUN with boost 1.57.

When using current 1.9 miniupnpc sources make sure to define -DMINIUPNP_STATICLIB instead of -DSTATICLIB (v1.9 release still needs -DSTATICLIB).

Hope that helps
19  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: December 23, 2014, 03:23:08 PM
Make sure not to use msys-gcc: uninstall relevant packages or delete mingw install dir and reinstall required msys packages only.
20  Bitcoin / Development & Technical Discussion / Re: Building headless Bitcoin and Bitcoin-qt on Windows on: December 20, 2014, 06:42:59 PM
Yes, but only after applying patches for qt5 compatibility to 0.8.6 sources:

Remove #define loop from util.h and replace loop with while (true) in
src/bitcoinrpc.cpp
src/main.cpp
src/net.cpp
src/script.cpp
src/util.cpp
src/wallet.cpp
src/walletdb.cpp
see: https://github.com/bitcoin/bitcoin/commit/8351d55cd3955c95c5e3fe065a456db08cc8a559

Qt5 compatibility. #if QT_VERSION < 0x050000 ... in
src/qt/addressbookpage.cpp
src/qt/bitcoin.cpp
src/qt/bitcoingui.cpp
src/qt/guiutil.cpp
src/qt/paymentserver.cpp
src/qt/qrcodedialog.cpp
src/qt/rpcconsole.cpp
src/qt/sendcoinsdialog.cpp
src/qt/transactionview.cpp
src/qt/walletview.cpp
see: https://github.com/bitcoin/bitcoin/commit/25c0cce7fb494fcb871d134e28b26504d30e34d3
http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html
http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5

Qt5 compatibility patch:
Code:
--- bitcoinrpc.cpp Thu Dec 05 13:11:26 2013
+++ bitcoinrpc.cpp Tue Dec 31 02:25:11 2013
@@ -417,7 +417,7 @@
 int ReadHTTPHeaders(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet)
 {
     int nLen = 0;
-    loop
+    while (true)
     {
         string str;
         std::getline(stream, str);
--- main.cpp Thu Dec 05 13:11:26 2013
+++ main.cpp Tue Dec 31 02:25:11 2013
@@ -4551,7 +4551,7 @@
     CReserveKey reservekey(pwallet);
     unsigned int nExtraNonce = 0;
 
-    try { loop {
+    try { while (true) {
         while (vNodes.empty())
             MilliSleep(1000);
 
@@ -4591,7 +4591,7 @@
         uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
         uint256 hashbuf[2];
         uint256& hash = *alignup<16>(hashbuf);
-        loop
+        while (true)
         {
             unsigned int nHashesDone = 0;
             unsigned int nNonceFound;
--- net.cpp Thu Dec 05 13:11:26 2013
+++ net.cpp Tue Dec 31 02:25:11 2013
@@ -135,7 +135,7 @@
 bool RecvLine(SOCKET hSocket, string& strLine)
 {
     strLine = "";
-    loop
+    while (true)
     {
         char c;
         int nBytes = recv(hSocket, &c, 1, 0);
@@ -307,7 +307,7 @@
     {
         if (strLine.empty()) // HTTP response is separated from headers by blank line
         {
-            loop
+            while (true)
             {
                 if (!RecvLine(hSocket, strLine))
                 {
@@ -750,7 +750,7 @@
 void ThreadSocketHandler()
 {
     unsigned int nPrevNodeCount = 0;
-    loop
+    while (true)
     {
         //
         // Disconnect nodes
@@ -1114,7 +1114,7 @@
         string strDesc = "Bitcoin " + FormatFullVersion();
 
         try {
-            loop {
+            while (true) {
 #ifndef UPNPDISCOVER_SUCCESS
                 /* miniupnpc 1.5 */
                 r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
@@ -1378,7 +1378,7 @@
 
     // Initiate network connections
     int64 nStart = GetTime();
-    loop
+    while (true)
     {
         ProcessOneShot();
 
@@ -1429,7 +1429,7 @@
         int64 nANow = GetAdjustedTime();
 
         int nTries = 0;
-        loop
+        while (true)
         {
             // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections)
             CAddress addr = addrman.Select(10 + min(nOutbound,8)*10);
--- script.cpp Thu Dec 05 13:11:26 2013
+++ script.cpp Tue Dec 31 02:25:11 2013
@@ -1163,7 +1163,7 @@
         // Compare
         CScript::const_iterator pc1 = script1.begin();
         CScript::const_iterator pc2 = script2.begin();
-        loop
+        while (true)
         {
             if (pc1 == script1.end() && pc2 == script2.end())
             {
--- util.cpp Thu Dec 05 13:11:26 2013
+++ util.cpp Tue Dec 31 02:25:11 2013
@@ -311,7 +311,7 @@
     char* p = buffer;
     int limit = sizeof(buffer);
     int ret;
-    loop
+    while (true)
     {
         va_list arg_ptr;
         va_copy(arg_ptr, ap);
@@ -371,7 +371,7 @@
         return;
     string::size_type i1 = 0;
     string::size_type i2;
-    loop
+    while (true)
     {
         i2 = str.find(c, i1);
         if (i2 == str.npos)
@@ -500,7 +500,7 @@
 {
     // convert hex dump to vector
     vector<unsigned char> vch;
-    loop
+    while (true)
     {
         while (isspace(*psz))
             psz++;
@@ -954,7 +954,7 @@
 
 bool WildcardMatch(const char* psz, const char* mask)
 {
-    loop
+    while (true)
     {
         switch (*mask)
         {
--- util.h Thu Dec 05 13:11:26 2013
+++ util.h Tue Dec 31 02:25:11 2013
@@ -37,7 +37,6 @@
 static const int64 COIN = 100000000;
 static const int64 CENT = 1000000;
 
-#define loop                for (;;)
 #define BEGIN(a)            ((char*)&(a))
 #define END(a)              ((char*)&((&(a))[1]))
 #define UBEGIN(a)           ((unsigned char*)&(a))
--- wallet.cpp Thu Dec 05 13:11:26 2013
+++ wallet.cpp Tue Dec 31 02:25:11 2013
@@ -1173,7 +1173,7 @@
         LOCK2(cs_main, cs_wallet);
         {
             nFeeRet = nTransactionFee;
-            loop
+            while (true)
             {
                 wtxNew.vin.clear();
                 wtxNew.vout.clear();
--- walletdb.cpp Thu Dec 05 13:11:26 2013
+++ walletdb.cpp Tue Dec 31 02:25:11 2013
@@ -73,7 +73,7 @@
     if (!pcursor)
         throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor");
     unsigned int fFlags = DB_SET_RANGE;
-    loop
+    while (true)
     {
         // Read next record
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
@@ -415,7 +415,7 @@
             return DB_CORRUPT;
         }
 
-        loop
+        while (true)
         {
             // Read next record
             CDataStream ssKey(SER_DISK, CLIENT_VERSION);
--- qt/addressbookpage.cpp Thu Dec 05 13:11:26 2013
+++ qt/addressbookpage.cpp Tue Dec 31 02:25:11 2013
@@ -143,8 +143,13 @@
     ui->tableView->sortByColumn(0, Qt::AscendingOrder);
 
     // Set column widths
+#if QT_VERSION < 0x050000
     ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
     ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
+#else
+    ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
+    ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
+#endif
 
     connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
             this, SLOT(selectionChanged()));
--- qt/bitcoin.cpp Thu Dec 05 13:11:26 2013
+++ qt/bitcoin.cpp Tue Dec 31 02:25:11 2013
@@ -17,7 +17,9 @@
 #include "splashscreen.h"
 
 #include <QMessageBox>
+#if QT_VERSION < 0x050000
 #include <QTextCodec>
+#endif
 #include <QLocale>
 #include <QTimer>
 #include <QTranslator>
@@ -118,9 +120,11 @@
     // Command-line options take precedence:
     ParseParameters(argc, argv);
 
+#if QT_VERSION < 0x050000
     // Internal string conversion is all UTF-8
     QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
     QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
+#endif
 
     Q_INIT_RESOURCE(bitcoin);
     QApplication app(argc, argv);
--- qt/bitcoingui.cpp Thu Dec 05 13:11:26 2013
+++ qt/bitcoingui.cpp Tue Dec 31 02:25:11 2013
@@ -44,7 +44,9 @@
 #include <QMovie>
 #include <QTimer>
 #include <QDragEnterEvent>
+#if QT_VERSION < 0x050000
 #include <QUrl>
+#endif
 #include <QMimeData>
 #include <QStyle>
 #include <QSettings>
--- qt/guiutil.cpp Thu Dec 05 13:11:26 2013
+++ qt/guiutil.cpp Tue Dec 31 02:25:11 2013
@@ -13,8 +13,12 @@
 #include <QDoubleValidator>
 #include <QFont>
 #include <QLineEdit>
+#if QT_VERSION >= 0x050000
+#include <QUrlQuery>
+#else
 #include <QUrl>
-#include <QTextDocument> // For Qt::escape
+#endif
+#include <QTextDocument> // for Qt::mightBeRichText
 #include <QAbstractItemView>
 #include <QClipboard>
 #include <QFileDialog>
@@ -86,7 +90,13 @@
     SendCoinsRecipient rv;
     rv.address = uri.path();
     rv.amount = 0;
+
+#if QT_VERSION < 0x050000
     QList<QPair<QString, QString> > items = uri.queryItems();
+#else
+    QUrlQuery uriQuery(uri);
+    QList<QPair<QString, QString> > items = uriQuery.queryItems();
+#endif
     for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
     {
         bool fShouldReturnFalse = false;
@@ -139,7 +149,11 @@
 
 QString HtmlEscape(const QString& str, bool fMultiLine)
 {
+#if QT_VERSION < 0x050000
     QString escaped = Qt::escape(str);
+#else
+    QString escaped = str.toHtmlEscaped();
+#endif
     if(fMultiLine)
     {
         escaped = escaped.replace("\n", "<br>\n");
@@ -176,7 +190,11 @@
     QString myDir;
     if(dir.isEmpty()) // Default to user documents location
     {
+#if QT_VERSION < 0x050000
         myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+#else
+        myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
+#endif
     }
     else
     {
--- qt/paymentserver.cpp Thu Dec 05 13:11:26 2013
+++ qt/paymentserver.cpp Tue Dec 31 02:25:11 2013
@@ -18,7 +18,9 @@
 #include <QLocalServer>
 #include <QLocalSocket>
 #include <QStringList>
+#if QT_VERSION < 0x050000
 #include <QUrl>
+#endif
 
 using namespace boost;
 
--- qt/qrcodedialog.cpp Thu Dec 05 13:11:26 2013
+++ qt/qrcodedialog.cpp Tue Dec 31 02:25:11 2013
@@ -7,7 +7,9 @@
 #include "optionsmodel.h"
 
 #include <QPixmap>
+#if QT_VERSION < 0x050000
 #include <QUrl>
+#endif
 
 #include <qrencode.h>
 
--- qt/rpcconsole.cpp Thu Dec 05 13:11:26 2013
+++ qt/rpcconsole.cpp Tue Dec 31 02:25:11 2013
@@ -8,7 +8,9 @@
 #include <QTime>
 #include <QThread>
 #include <QKeyEvent>
+#if QT_VERSION < 0x050000
 #include <QUrl>
+#endif
 #include <QScrollBar>
 
 #include <openssl/crypto.h>
--- qt/sendcoinsdialog.cpp Thu Dec 05 13:11:26 2013
+++ qt/sendcoinsdialog.cpp Tue Dec 31 02:25:11 2013
@@ -93,7 +93,11 @@
     QStringList formatted;
     foreach(const SendCoinsRecipient &rcp, recipients)
     {
+#if QT_VERSION < 0x050000
         formatted.append(tr("<b>%1</b> to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), Qt::escape(rcp.label), rcp.address));
+#else
+        formatted.append(tr("<b>%1</b> to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), rcp.label.toHtmlEscaped(), rcp.address));
+#endif
     }
 
     fNewRecipientAllowed = false;
--- qt/transactionview.cpp Thu Dec 05 13:11:26 2013
+++ qt/transactionview.cpp Tue Dec 31 02:25:11 2013
@@ -176,7 +176,11 @@
         transactionView->horizontalHeader()->resizeSection(TransactionTableModel::Status, 23);
         transactionView->horizontalHeader()->resizeSection(TransactionTableModel::Date, 120);
         transactionView->horizontalHeader()->resizeSection(TransactionTableModel::Type, 120);
+#if QT_VERSION < 0x050000
         transactionView->horizontalHeader()->setResizeMode(TransactionTableModel::ToAddress, QHeaderView::Stretch);
+#else
+        transactionView->horizontalHeader()->setSectionResizeMode(TransactionTableModel::ToAddress, QHeaderView::Stretch);
+#endif
         transactionView->horizontalHeader()->resizeSection(TransactionTableModel::Amount, 100);
     }
 }
--- qt/walletview.cpp Thu Dec 05 13:11:26 2013
+++ qt/walletview.cpp Tue Dec 31 02:25:11 2013
@@ -21,7 +21,11 @@
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QAction>
+#if QT_VERSION < 0x050000
 #include <QDesktopServices>
+#else
+#include <QStandardPaths>
+#endif
 #include <QFileDialog>
 #include <QPushButton>
 
@@ -233,7 +237,11 @@
 
 void WalletView::backupWallet()
 {
+#if QT_VERSION < 0x050000
     QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+#else
+    QString saveDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
+#endif
     QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)"));
     if (!filename.isEmpty()) {
         if (!walletModel->backupWallet(filename)) {
Pages: [1] 2 3 4 5 6 7 »
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!