Skip to content

Commit

Permalink
Update Pro File to Windows Build
Browse files Browse the repository at this point in the history
Update Pro File to Windows Build
  • Loading branch information
HowToCloneAnAltcoin committed Nov 7, 2014
1 parent d309822 commit 5c82150
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions clonecoin-qt.pro
Expand Up @@ -8,7 +8,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
CONFIG += thread

CONFIG += static
# for boost 1.37, add -mt to the boost libraries
# use: qmake BOOST_LIB_SUFFIX=-mt
# for boost thread win32 with _win32 sufix
Expand All @@ -18,7 +18,17 @@ CONFIG += thread
# Dependency library locations can be customized with:
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively

BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
BOOST_LIB_PATH=C:/deps/boost_1_55_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.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
UI_DIR = build
Expand Down Expand Up @@ -48,7 +58,7 @@ QMAKE_CXXFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
# on Windows: enable GCC large address aware linker flag
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
# i686-w64-mingw32
win32:QMAKE_LFLAGS *= -static-libgcc -static-libstdc++

Expand Down Expand Up @@ -105,7 +115,7 @@ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
!win32 {
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
#genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
} else {
# make an educated guess about what the ranlib command is called
isEmpty(QMAKE_RANLIB) {
Expand Down

1 comment on commit 5c82150

@august434
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error relate to UPnP as show below.

Please kindly help solve the issue.

Thank you!

C:\Coin>mingw32-make -f Makefile.Release c:\Qt\4.8.6\bin\rcc.exe -name bitcoin src\qt\bitcoin.qrc -o release\qrc_bitcoin.cpp g++ -c -pipe -fno-keep-inline-dllexport -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -frtti -fexceptions -mthreads -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -DUNICODE -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_QRCODE -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DWIN32 -D_MT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"..\Qt\4.8.6\include\QtCore" -I"..\Qt\4.8.6\include\QtNetwork" -I"..\Qt\4.8.6\include\QtGui" -I"..\Qt\4.8.6\include" -I"src" -I"src\json" -I"src\qt" -I"..\deps" -I"src\leveldb\include" -I"src\leveldb\helpers" -I"..\deps\boost_1_55_0" -I"..\deps\db-4.8.30.NC\build_unix" -I"..\deps\openssl-1.0.1j\include" -I"..\deps\qrencode-3.4.4" -I"..\Qt\4.8.6\include\ActiveQt" -I"build" -I"build" -I"..\Qt\4.8.6\mkspecs\default" -o build\qrc_bitcoin.o release\qrc_bitcoin.cpp g++ -Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -static -static-libgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\coin-qt.exe object_script.coin-qt.Release -L"c:\Qt\4.8.6\lib" -lmingwthrd -lmingw32 -lqtmain build\bitcoin-qt_res.o -lqrencode -LC:/deps/miniupnpc -lminiupnpc -liphlpapi C:/coin/src/leveldb/libleveldb.a C:/coin/src/leveldb/libmemenv.a -lshlwapi -LC:/deps/boost_1_55_0/stage/lib -LC:/deps/db-4.8.30.NC/build_unix -LC:/deps/openssl-1.0.1j -LC:/deps/qrencode-3.4.4/.libs -lssl -lcrypto -ldb_cxx -lshlwapi -lmswsock -lboost_system-mgw49-mt-s-1_55 -lboost_filesystem-mgw49-mt-s-1_55 -lboost_program_options-mgw49-mt-s-1_55 -lboost_thread-mgw49-mt-s-1_55 -lboost_chrono-mgw49-mt-s-1_55 -lQtGui -lQtNetwork -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 ./build\net.o:net.cpp:(.text+0x88f3): undefined reference to_imp__upnpDiscover' ./build\net.o:net.cpp:(.text+0x892a): undefined reference to _imp__UPNP_GetValidIGD' ./build\net.o:net.cpp:(.text+0x896b): undefined reference to_imp__UPNP_GetExternalIPAddress' ./build\net.o:net.cpp:(.text+0x89e7): undefined reference to _imp__freeUPNPDevlist' ./build\net.o:net.cpp:(.text+0x89fa): undefined reference to_imp__FreeUPNPUrls' ./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to _imp__strupnperror' ./build\net.o:net.cpp:(.text+0x8b73): undefined reference to_imp__UPNP_AddPortMapping' ./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to _imp__UPNP_DeletePortMapping' ./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to_imp__freeUPNPDevlist' ./build\net.o:net.cpp:(.text+0x8c29): undefined reference to _imp__FreeUPNPUrls' C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: ./build\net.o: bad reloc address 0x960 in section.data' C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: final link failed: Invalid operation collect2.exe: error: ld returned 1 exit status Makefile.Release:291: recipe for target 'release\coin-qt.exe' failed mingw32-make: *** [release\coin-qt.exe] Error 1`

Please sign in to comment.