Post
Topic
Board Development & Technical Discussion
Re: Building headless Bitcoin and Bitcoin-qt on Windows
by
nitrogenetics
on 11/01/2015, 16:09:46 UTC
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
 #include
 #include
@@ -227,3 +228,4 @@
 #endif
 
 #include
+#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