Pages:
Author

Topic: Building headless Bitcoin and Bitcoin-qt on Windows - page 13. (Read 419390 times)

legendary
Activity: 1400
Merit: 1000
Hi fsb4000,

I'm learning about the build process so I wanted to propose a reason that your solution might work and see if anyone can point out a flaw in my understanding.  Here's my theory:

The existing net.o file contains references to the functions displayed in the error, but those references are now invalid and thus require a new object (.o) file to be created.  When the compiler makes a new net.o file, it will contain up-to-date references to the functions it needs.

Ideally, the build process would know (from timestamps on source files) that the net.o file is out of date, but that isn't happening.

The necessity of rebuilding net.o might be a known problem that is "easily enough solved" and so no one is doing anything about (and there might not be any reasonably simple solution anyway).  However, "undefined reference to [function name]" errors in any object file might be "easily enough solved" most of the time by simply deleting the .o file so that it gets rebuilt.  Do you know if that is the case, and about how often "undefined reference to..." errors in .o files are fixed by rebuilding them?

Thanks for your insight.

Yes, you're absolutely right.
A small clarification: not simply rebuild but rebuild with -DMINIUPNP_STATICLIB definition.

By the way if DEFS are changed in Visual Studio then Visual Studio rebuild object files Smiley

"undefined reference to..." is the result to two reasons:
1) Not added a library for the linker.
2) Object file is built without necessary definitions

So the error are fixed by rebuilding object files often but not always.
legendary
Activity: 2674
Merit: 3000
Terminated.
I do think in the past, there have been bundles of the precompiled prereqs. I think they were most often on altcoin guides/kits though -- of which I think a few here on bitcointalk link to such bundles but now outdated versions of the libraries(you'll def want to update at least ssl). I think the likely reasons they arn't common is that they the prereqs are often updated, combined with most people compiling bitcoin itself for educational purposes are generally interested enough in the whole process and an optimized environment so they don't mind compiling the pre-reqs.

The most common benefit from compiling from source use is for compilation flags that are not often included in redistributed binaries or libraries -- but since we are all(for the most part) using the same configurations, that is negated here. Aside from that, there are some architecture and platform differences, so something compiled on a new system might not run on an older platform due to having different(newer, unavailable to the old platform) optimized instruction sets. There will likely be some issues with things like system configuration, local system dependencies, paths, etc that are configured during compilation -- I am not experienced enough with the libraries themselves to know to what extent and if it is prohibitive of distribution.

Of course, there is also the security bonus of compiling everything involved directly from developer source. I tend not to trust ANYTHING pre-compiled with the bandit riddled wild west gold rush that is the cryptoscape -- unless running in a VM and even though with caution in regards to what it might have access to or be used for.


But someone could precompile everything let's say for Windows 7 64bit. Shouldn't it work for people who use that particular OS?
You're right. There is definitely some risk involved, but there is with every software that you install. What I was trying to say is that someone should figure out a easier way for everyone to follow up. This guide is quite good but there are just so many errors that one could come across.
sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
I wanted to compile LTC but I have a problem:

I use qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1" litecoin-qt.pro and then mingw32-make -f Makefile.Release and I see...

Code:
...
./build\net.o:net.cpp:(.text+0x8929): undefined reference to `_imp__FreeUPNPUrls

If I use UPNP=- the same errors :/

Please help...

1. open build folder.
2. delete net.o
3. open cmd
4. cd to folder with .pro file
5. qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1"
6. mingw32-make -f Makefile.Release
Hi fsb4000,

I'm learning about the build process so I wanted to propose a reason that your solution might work and see if anyone can point out a flaw in my understanding.  Here's my theory:

The existing net.o file contains references to the functions displayed in the error, but those references are now invalid and thus require a new object (.o) file to be created.  When the compiler makes a new net.o file, it will contain up-to-date references to the functions it needs.

Ideally, the build process would know (from timestamps on source files) that the net.o file is out of date, but that isn't happening.

The necessity of rebuilding net.o might be a known problem that is "easily enough solved" and so no one is doing anything about (and there might not be any reasonably simple solution anyway).  However, "undefined reference to [function name]" errors in any object file might be "easily enough solved" most of the time by simply deleting the .o file so that it gets rebuilt.  Do you know if that is the case, and about how often "undefined reference to..." errors in .o files are fixed by rebuilding them?

Thanks for your insight.
legendary
Activity: 1400
Merit: 1000
I wanted to compile LTC but I have a problem:

I use qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1" litecoin-qt.pro and then mingw32-make -f Makefile.Release and I see...

Code:
./build\net.o:net.cpp:(.text+0x85f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x862a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x866b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x86e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x86fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x87e7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8873): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x88fb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x891a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8929): undefined reference to `_imp__FreeUPNPUrls

If I use UPNP=- the same errors :/

Please help...

1. open build folder.
2. delete net.o
3. open cmd
4. cd to folder with .pro file
5. qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1"
6. mingw32-make -f Makefile.Release
legendary
Activity: 1148
Merit: 1018
It's about time -- All merrit accepted !!!
I agree here, compiling the tools on your own is a safety feature.
sr. member
Activity: 293
Merit: 251
Director - www.cubeform.io
For those people, there is the precompiled bitcoin.
This is not the same. I was talking about downloading the build environment and then compiling rather than compiling every library yourself.
The amount of potential errors is outstanding.

I do think in the past, there have been bundles of the precompiled prereqs. I think they were most often on altcoin guides/kits though -- of which I think a few here on bitcointalk link to such bundles but now outdated versions of the libraries(you'll def want to update at least ssl). I think the likely reasons they arn't common is that they the prereqs are often updated, combined with most people compiling bitcoin itself for educational purposes are generally interested enough in the whole process and an optimized environment so they don't mind compiling the pre-reqs.

The most common benefit from compiling from source use is for compilation flags that are not often included in redistributed binaries or libraries -- but since we are all(for the most part) using the same configurations, that is negated here. Aside from that, there are some architecture and platform differences, so something compiled on a new system might not run on an older platform due to having different(newer, unavailable to the old platform) optimized instruction sets. There will likely be some issues with things like system configuration, local system dependencies, paths, etc that are configured during compilation -- I am not experienced enough with the libraries themselves to know to what extent and if it is prohibitive of distribution.

Of course, there is also the security bonus of compiling everything involved directly from developer source. I tend not to trust ANYTHING pre-compiled with the bandit riddled wild west gold rush that is the cryptoscape -- unless running in a VM and even though with caution in regards to what it might have access to or be used for.

newbie
Activity: 20
Merit: 0
Someone else may be able to say this better.

The tools cannot just be copied on your computer if built on another.

You would still have to add the path to your environment variables and some will just not work at all.

It is true that sometimes if one file is missing or corrupt it can be copied from another persons build but for copying the whole thing I can't imagine it would work.

For those people, there is the precompiled bitcoin.
This is not the same. I was talking about downloading the build environment and then compiling rather than compiling every library yourself.
The amount of potential errors is outstanding.
legendary
Activity: 2674
Merit: 3000
Terminated.
For those people, there is the precompiled bitcoin.
This is not the same. I was talking about downloading the build environment and then compiling rather than compiling every library yourself.
The amount of potential errors is outstanding.
member
Activity: 62
Merit: 10
I wanted to compile LTC but I have a problem:

I use qmake "USE_QRCODE=1" "USE_UPNP=1" "USE_IPV6=1" litecoin-qt.pro and then mingw32-make -f Makefile.Release and I see...

Code:
C:\ltc>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 -O
2 -frtti -fexceptions -mthreads -fdiagnostics-show-option -Wall -Wextra -Wformat
 -Wformat-security -Wno-unused-parameter -Wstack-protector -DUNICODE -DQT_GUI -D
BOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_QRCODE -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"src\leveldb\include"
-I"src\leveldb\helpers" -I"..\deps\boost_1_57_0" -I"..\deps\db-4.8.30.NC\build_u
nix" -I"..\deps\openssl-1.0.1l\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 -Wl,-s -m
threads -Wl,-subsystem,windows -o release\litecoin-qt.exe object_script.litecoin
-qt.Release  -L"c:\Qt\4.8.6\lib" -lmingwthrd -lmingw32 -lqtmain build\bitcoin-qt
_res.o -lqrencode C:/ltc/src/leveldb/libleveldb.a C:/ltc/src/leveldb/libmemenv.a
 -lshlwapi -LC:/deps/boost_1_57_0/stage/lib -LC:/deps/db-4.8.30.NC/build_unix -L
C:/deps/openssl-1.0.1l -LC:/deps/qrencode-3.4.4/.libs -lssl -lcrypto -ldb_cxx -l
shlwapi -lmswsock -lboost_system-mgw49-mt-s-1_57 -lboost_filesystem-mgw49-mt-s-1
_57 -lboost_program_options-mgw49-mt-s-1_57 -lboost_thread-mgw49-mt-s-1_57 -lboo
st_chrono-mgw49-mt-s-1_57 -lQtGui -lQtNetwork -lgdi32 -lcomdlg32 -loleaut32 -lim
m32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -ls
hell32 -luser32 -lkernel32
./build\net.o:net.cpp:(.text+0x85f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x862a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x866b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x86e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x86fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x87e7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8873): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x88fb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x891a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8929): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\litecoin-qt.exe' failed
mingw32-make: *** [release\litecoin-qt.exe] Error 1

C:\ltc>

I think my litecoin-qt.pro is OK. I even changed LIBSTATIC to MINIUPNP_STATICLIB but it doesn't help.

Code:
TEMPLATE = app
TARGET = litecoin-qt
macx:TARGET = "Litecoin-Qt"
VERSION = 0.8.7.5
INCLUDEPATH += src src/json src/qt
QT += core gui network
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
# use: BOOST_THREAD_LIB_SUFFIX=_win32-...
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8

# 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_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.1l/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1l
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

# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
    # Mac: compile for maximum compatibility (10.5, 32-bit)
    macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
    macx:QMAKE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
    macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk

    !win32:!macx {
        # Linux: static link and extra security (see: https://wiki.debian.org/Hardening)
        LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now
    }
}

!win32 {
    # for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
    QMAKE_CXXFLAGS *= -fstack-protector-all
    QMAKE_LFLAGS *= -fstack-protector-all
    # Exclude on Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
    # This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
}
# for extra security (see: https://wiki.debian.org/Hardening): this flag is GCC compiler-specific
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 -static
# i686-w64-mingw32
#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
contains(USE_QRCODE, 1) {
    message(Building with QRCode support)
    DEFINES += USE_QRCODE
    LIBS += -lqrencode
}

# use: qmake "USE_UPNP=1" ( enabled by default; default)
#  or: qmake "USE_UPNP=0" (disabled by default)
#  or: qmake "USE_UPNP=-" (not supported)
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support
contains(USE_UPNP, -) {
    message(Building without UPNP support)
} else {
    message(Building with UPNP support)
    count(USE_UPNP, 0) {
        USE_UPNP=1
    }
    DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB
    INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH
    LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc
    win32:LIBS += -liphlpapi
}

# use: qmake "USE_DBUS=1"
contains(USE_DBUS, 1) {
    message(Building with DBUS (Freedesktop notifications) support)
    DEFINES += USE_DBUS
    QT += dbus
}

# use: qmake "USE_IPV6=1" ( enabled by default; default)
#  or: qmake "USE_IPV6=0" (disabled by default)
#  or: qmake "USE_IPV6=-" (not supported)
contains(USE_IPV6, -) {
    message(Building without IPv6 support)
} else {
    count(USE_IPV6, 0) {
        USE_IPV6=1
    }
    DEFINES += USE_IPV6=$$USE_IPV6
}

contains(BITCOIN_NEED_QT_PLUGINS, 1) {
    DEFINES += BITCOIN_NEED_QT_PLUGINS
    QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
}

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
} else {
    # make an educated guess about what the ranlib command is called
    isEmpty(QMAKE_RANLIB) {
        QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
    }
    LIBS += -lshlwapi
    #genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
}
genleveldb.target = $$PWD/src/leveldb/libleveldb.a
genleveldb.depends = FORCE
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
QMAKE_EXTRA_TARGETS += genleveldb
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean

# regenerate src/build.h
!win32|contains(USE_BUILD_INFO, 1) {
    genbuild.depends = FORCE
    genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h
    genbuild.target = $$OUT_PWD/build/build.h
    PRE_TARGETDEPS += $$OUT_PWD/build/build.h
    QMAKE_EXTRA_TARGETS += genbuild
    DEFINES += HAVE_BUILD_INFO
}

QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector

# Input
DEPENDPATH += src src/json src/qt
HEADERS += src/qt/bitcoingui.h \
    src/qt/transactiontablemodel.h \
    src/qt/addresstablemodel.h \
    src/qt/optionsdialog.h \
    src/qt/sendcoinsdialog.h \
    src/qt/coincontroldialog.h \
    src/qt/coincontroltreewidget.h \
    src/qt/addressbookpage.h \
    src/qt/signverifymessagedialog.h \
    src/qt/aboutdialog.h \
    src/qt/editaddressdialog.h \
    src/qt/bitcoinaddressvalidator.h \
    src/alert.h \
    src/addrman.h \
    src/base58.h \
    src/bignum.h \
    src/checkpoints.h \
    src/coincontrol.h \
    src/compat.h \
    src/sync.h \
    src/util.h \
    src/hash.h \
    src/uint256.h \
    src/serialize.h \
    src/main.h \
    src/net.h \
    src/key.h \
    src/db.h \
    src/walletdb.h \
    src/script.h \
    src/init.h \
    src/bloom.h \
    src/mruset.h \
    src/checkqueue.h \
    src/json/json_spirit_writer_template.h \
    src/json/json_spirit_writer.h \
    src/json/json_spirit_value.h \
    src/json/json_spirit_utils.h \
    src/json/json_spirit_stream_reader.h \
    src/json/json_spirit_reader_template.h \
    src/json/json_spirit_reader.h \
    src/json/json_spirit_error_position.h \
    src/json/json_spirit.h \
    src/qt/clientmodel.h \
    src/qt/guiutil.h \
    src/qt/transactionrecord.h \
    src/qt/guiconstants.h \
    src/qt/optionsmodel.h \
    src/qt/monitoreddatamapper.h \
    src/qt/transactiondesc.h \
    src/qt/transactiondescdialog.h \
    src/qt/bitcoinamountfield.h \
    src/wallet.h \
    src/keystore.h \
    src/qt/transactionfilterproxy.h \
    src/qt/transactionview.h \
    src/qt/walletmodel.h \
    src/qt/walletview.h \
    src/qt/walletstack.h \
    src/qt/walletframe.h \
    src/bitcoinrpc.h \
    src/qt/overviewpage.h \
    src/qt/csvmodelwriter.h \
    src/crypter.h \
    src/qt/sendcoinsentry.h \
    src/qt/qvalidatedlineedit.h \
    src/qt/bitcoinunits.h \
    src/qt/qvaluecombobox.h \
    src/qt/askpassphrasedialog.h \
    src/protocol.h \
    src/qt/notificator.h \
    src/qt/paymentserver.h \
    src/allocators.h \
    src/ui_interface.h \
    src/qt/rpcconsole.h \
    src/scrypt.h \
    src/version.h \
    src/netbase.h \
    src/clientversion.h \
    src/txdb.h \
    src/leveldb.h \
    src/threadsafety.h \
    src/limitedmap.h \
    src/qt/macnotificationhandler.h \
    src/qt/splashscreen.h

SOURCES += src/qt/bitcoin.cpp \
    src/qt/bitcoingui.cpp \
    src/qt/transactiontablemodel.cpp \
    src/qt/addresstablemodel.cpp \
    src/qt/optionsdialog.cpp \
    src/qt/sendcoinsdialog.cpp \
    src/qt/coincontroldialog.cpp \
    src/qt/coincontroltreewidget.cpp \
    src/qt/addressbookpage.cpp \
    src/qt/signverifymessagedialog.cpp \
    src/qt/aboutdialog.cpp \
    src/qt/editaddressdialog.cpp \
    src/qt/bitcoinaddressvalidator.cpp \
    src/alert.cpp \
    src/version.cpp \
    src/sync.cpp \
    src/util.cpp \
    src/hash.cpp \
    src/netbase.cpp \
    src/key.cpp \
    src/script.cpp \
    src/main.cpp \
    src/init.cpp \
    src/net.cpp \
    src/bloom.cpp \
    src/checkpoints.cpp \
    src/addrman.cpp \
    src/db.cpp \
    src/walletdb.cpp \
    src/qt/clientmodel.cpp \
    src/qt/guiutil.cpp \
    src/qt/transactionrecord.cpp \
    src/qt/optionsmodel.cpp \
    src/qt/monitoreddatamapper.cpp \
    src/qt/transactiondesc.cpp \
    src/qt/transactiondescdialog.cpp \
    src/qt/bitcoinstrings.cpp \
    src/qt/bitcoinamountfield.cpp \
    src/wallet.cpp \
    src/keystore.cpp \
    src/qt/transactionfilterproxy.cpp \
    src/qt/transactionview.cpp \
    src/qt/walletmodel.cpp \
    src/qt/walletview.cpp \
    src/qt/walletstack.cpp \
    src/qt/walletframe.cpp \
    src/bitcoinrpc.cpp \
    src/rpcdump.cpp \
    src/rpcnet.cpp \
    src/rpcmining.cpp \
    src/rpcwallet.cpp \
    src/rpcblockchain.cpp \
    src/rpcrawtransaction.cpp \
    src/qt/overviewpage.cpp \
    src/qt/csvmodelwriter.cpp \
    src/crypter.cpp \
    src/qt/sendcoinsentry.cpp \
    src/qt/qvalidatedlineedit.cpp \
    src/qt/bitcoinunits.cpp \
    src/qt/qvaluecombobox.cpp \
    src/qt/askpassphrasedialog.cpp \
    src/protocol.cpp \
    src/qt/notificator.cpp \
    src/qt/paymentserver.cpp \
    src/qt/rpcconsole.cpp \
    src/scrypt.cpp \
    src/noui.cpp \
    src/leveldb.cpp \
    src/txdb.cpp \
    src/qt/splashscreen.cpp

RESOURCES += src/qt/bitcoin.qrc

FORMS += src/qt/forms/sendcoinsdialog.ui \
    src/qt/forms/coincontroldialog.ui \
    src/qt/forms/addressbookpage.ui \
    src/qt/forms/signverifymessagedialog.ui \
    src/qt/forms/aboutdialog.ui \
    src/qt/forms/editaddressdialog.ui \
    src/qt/forms/transactiondescdialog.ui \
    src/qt/forms/overviewpage.ui \
    src/qt/forms/sendcoinsentry.ui \
    src/qt/forms/askpassphrasedialog.ui \
    src/qt/forms/rpcconsole.ui \
    src/qt/forms/optionsdialog.ui

contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
SOURCES += src/qt/qrcodedialog.cpp
FORMS += src/qt/forms/qrcodedialog.ui
}

contains(BITCOIN_QT_TEST, 1) {
SOURCES += src/qt/test/test_main.cpp \
    src/qt/test/uritests.cpp
HEADERS += src/qt/test/uritests.h
DEPENDPATH += src/qt/test
QT += testlib
TARGET = litecoin-qt_test
DEFINES += BITCOIN_QT_TEST
  macx: CONFIG -= app_bundle
}

contains(USE_SSE2, 1) {
DEFINES += USE_SSE2
gccsse2.input  = SOURCES_SSE2
gccsse2.output = $$PWD/build/${QMAKE_FILE_BASE}.o
gccsse2.commands = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} -msse2 -mstackrealign
QMAKE_EXTRA_COMPILERS += gccsse2
SOURCES_SSE2 += src/scrypt-sse2.cpp
}

# Todo: Remove this line when switching to Qt5, as that option was removed
CODECFORTR = UTF-8

# for lrelease/lupdate
# also add new translations to src/qt/bitcoin.qrc under translations/
TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts)

isEmpty(QMAKE_LRELEASE) {
    win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
    else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale
# automatically build translations, so they can be included in resource file
TSQM.name = lrelease ${QMAKE_FILE_IN}
TSQM.input = TRANSLATIONS
TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
TSQM.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += TSQM

# "Other files" to show in Qt Creator
OTHER_FILES += README.md \
    doc/*.rst \
    doc/*.txt \
    doc/*.md \
    src/qt/res/bitcoin-qt.rc \
    src/test/*.cpp \
    src/test/*.h \
    src/qt/test/*.cpp \
    src/qt/test/*.h

# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
    macx:BOOST_LIB_SUFFIX = -mt
    win32:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_50
}

isEmpty(BOOST_THREAD_LIB_SUFFIX) {
    BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
}

isEmpty(BDB_LIB_PATH) {
    macx:BDB_LIB_PATH = /opt/local/lib/db48
}

isEmpty(BDB_LIB_SUFFIX) {
    macx:BDB_LIB_SUFFIX = -4.8
}

isEmpty(BDB_INCLUDE_PATH) {
    macx:BDB_INCLUDE_PATH = /opt/local/include/db48
}

isEmpty(BOOST_LIB_PATH) {
    macx:BOOST_LIB_PATH = /opt/local/lib
}

isEmpty(BOOST_INCLUDE_PATH) {
    macx:BOOST_INCLUDE_PATH = /opt/local/include
}

win32:DEFINES += WIN32
win32:RC_FILE = src/qt/res/bitcoin-qt.rc

win32:!contains(MINGW_THREAD_BUGFIX, 0) {
    # At least qmake's win32-g++-cross profile is missing the -lmingwthrd
    # thread-safety flag. GCC has -mthreads to enable this, but it doesn't
    # work with static linking. -lmingwthrd must come BEFORE -lmingw, so
    # it is prepended to QMAKE_LIBS_QT_ENTRY.
    # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes
    # any problems on some untested qmake profile now or in the future.
    DEFINES += _MT
    QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY
}

!win32:!macx {
    DEFINES += LINUX
    LIBS += -lrt
    # _FILE_OFFSET_BITS=64 lets 32-bit fopen transparently support large files.
    DEFINES += _FILE_OFFSET_BITS=64
}

macx:HEADERS += src/qt/macdockiconhandler.h src/qt/macnotificationhandler.h
macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm src/qt/macnotificationhandler.mm
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit -framework CoreServices
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:ICON = src/qt/res/icons/litecoin.icns
macx:QMAKE_CFLAGS_THREAD += -pthread
macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_CXXFLAGS_THREAD += -pthread
macx:QMAKE_INFO_PLIST = share/qt/Info.plist

# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
# -lgdi32 has to happen after -lcrypto (see  #681)
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX

contains(RELEASE, 1) {
    !win32:!macx {
        # Linux: turn dynamic linking back on for c/c++ runtime libraries
        LIBS += -Wl,-Bdynamic
    }
}

system($$QMAKE_LRELEASE -silent $$TRANSLATIONS)

If I use UPNP=- the same errors :/

Please help...
legendary
Activity: 1148
Merit: 1018
It's about time -- All merrit accepted !!!
Yes , if you just want to 'watch' it compile maybe someone can make a video and post it to youtube

actually I think it would be a good idea if anyone wants to take the time to bother

no need to show building the tools/deps,  just the final compile what it looks like

It may fascinate some people and scare off a few others !!


I've tried my luck with compiling a few times and every single time I was unsuccessful.
I wonder why nobody has uploaded everything pre-compiled? That would make things much easier.

For those people, there is the precompiled bitcoin.
sr. member
Activity: 293
Merit: 251
Director - www.cubeform.io
I've tried my luck with compiling a few times and every single time I was unsuccessful.
I wonder why nobody has uploaded everything pre-compiled? That would make things much easier.

For those people, there is the precompiled bitcoin.
legendary
Activity: 2674
Merit: 3000
Terminated.
I've tried my luck with compiling a few times and every single time I was unsuccessful.
I wonder why nobody has uploaded everything pre-compiled? That would make things much easier.
sr. member
Activity: 260
Merit: 251
Thank you for your advice altcoinex, I will try that when I get home.

small edit:
I never heard/read anything about this line "CONFIG += static". I will keep you posted if this works out or not.
LOL I thought you meant something else  Grin Yes I have this in the .pro file already  Wink

It seems my "error" has been there for years on other coins as well.. This is not a litecoin problem though.. or bitcoin. I am certain it must be something with my pc. I tried googling this issue, and found a few articles. But none of the articles I read offer a solution.  I guess I will try a clean build windows next. Since win7 did not work out for me. I will try it with 8.1 next. Now that were talking windows here a little bit. What is the recommended windows version to compile wallets with?
Hello BanzaiBTC,

What is error you have been seeing?  I found that the Bitcoin and all other *coins 'derived' from it have poor Windows exit routines, especially if there is an error, and really bad if Windows shuts the application down.  See https://bitcointalk.org/index.php?topic=149479.920

What happens to your Bitcoind.exe or Bitcoin-qt.exe (or any other *coind.exe or *coin-qt.exe) when Windows logs off the user?  Windows shuts down? When the daemon gets a CTL-break?  A CTL-C? A close window?

It seems to me that over the last 2+ years, the build process has become a tortured mess of chasing the lastest tools and libraries with all their dependencies upon each other and the OS they run on.  It was much simpler back in 2013 with QT 4.8.4,  gcc 4.6.2, Boost 1.53, BerkeleyDB 4.8.30 (still the same, bravo!) leveldb 1.12 (ish), OpenSSL 1.0.1c-d-e-...i-j

I need to do an updated OpenSSL video showing how to build a gcc for Windows, and a MSVC++ for windows MT and MTd that you can debug right down into the ecdsa signature verify code!  Should it really take milliseconds, I wonder?

You ask: "What is the recommended windows version to compile wallets with?".

I would recommend any version of Windows that supports MSVC++ Express or Studio, versions 2005, 2008 ...!

See https://bitcointalksearch.org/topic/m.5937160
I have been building daemons of Bitcoin and many other coins quite easily.  The only tricky part, and that is really not hard at all, is building the static multi-threaded libraries.  See https://www.youtube.com/channel/UCytoaHvG3H1y9CnxZS819eQ where I show how easy it is to build the libraries, once, and use them over and over again on different coins.  There isn't anything quite like the full bore debugger in MSVS.  And it's all free.  BTW, MSVC++ Express 2005 runs great on Linux!!  See https://appdb.winehq.org/objectManager.php?sClass=version&iId=14208
I can't vouch for it since I run mine on Windows XP pro SP2!  The code  runs fine on a Win 7 SP1 unit.

Ron
sr. member
Activity: 444
Merit: 250
I prefer evolution to revolution.
I would like to help everyone here who builds bitcoin be able to work on issues.  This means being able to establish a baseline (get latest stable code, run all tests, and see them pass).  Toward this end, I wanted to make a patch to get around this problem:
-hexdump
To generate test data an hexdump like program is needed.
Download and unpack https://github.com/wahern/hexdump then compile hexdump.exe by running:
Code:
gcc -std=gnu99 -g -O2 -Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-parameter hexdump.c -DHEXDUMP_MAIN -o hexdump.exe
Do not forget to add hexdump folder to your PATH environment variable.

-bitcoin
In order to work with the previously compiled hexdump version Makefile must be patched (src/Makefile.test.include if v0.10, src/Makefile.include if v0.9):
Code:
--- src/Makefile.test.include	Tue Dec 23 20:14:37 2014
+++ src/Makefile.test.include Sat Jan 10 16:53:56 2015
@@ -111,7 +111,7 @@
  @$(MKDIR_P) $(@D)
  @echo "namespace json_tests{" > $@
  @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
+ @$(HEXDUMP) -e '8/1 "0x%02x, "' $< | $(SED) -e 's/0x  ,//g' >> $@
  @echo "};};" >> $@
  @echo "Generated $@"
 
@@ -119,6 +119,6 @@
  @$(MKDIR_P) $(@D)
  @echo "namespace alert_tests{" > $@
  @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
+ @$(HEXDUMP) -e '8/1 "0x%02x, "' $< | $(SED) -e 's/0x  ,//g' >> $@
  @echo "};};" >> $@
  @echo "Generated $@"

I failed to establish a baseline myself, though, and ran into some trouble in working on that.  cfields_ in #bitcoin-dev suggested that
Code:
make bitcoin_test_clean && make check
is the best way to do that.  I found that this only works from bitcoin/src, though the ./configure and make commands to build are executed from bitcoin/. I will remove my changes and try that, but with my changes, make check produces this output:
Code:
Dave@WindowsCompiler /c/bitcoin/src/qt/test
$ make check
make -C ../../ test_bitcoin_qt_check
make[1]: Entering directory `/c/bitcoin/src'
make[2]: Entering directory `/c/bitcoin/src/secp256k1'
make[2]: Leaving directory `/c/bitcoin/src/secp256k1'
make check-TESTS TESTS=qt/test/test_bitcoin-qt.exe FORCE
make[2]: Entering directory `/c/bitcoin/src'
make[3]: Entering directory `/c/bitcoin/src/secp256k1'
make[3]: Leaving directory `/c/bitcoin/src/secp256k1'
FAIL: qt/test/test_bitcoin-qt.exe
=================================
1 of 1 test failed
Please report to [email protected]
=================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/c/bitcoin/src'
make[1]: *** [test_bitcoin_qt_check] Error 2
make[1]: Leaving directory `/c/bitcoin/src'
make: *** [check] Error 2
No log file is generated in src or any subfolder of it.  I ran src/qt/test/test_bitcoin-qt.exe and got no output and no log file.  Any advice would be appreciated.
legendary
Activity: 1148
Merit: 1018
It's about time -- All merrit accepted !!!
i test my wallets on win 7, 8, and 8.1 , several different machines, can build static or non static on all,

for newer codebase of bitcoin i recommend windows 8 since putting the tools together on some win 7 machines is a little tricky but not impossible.


To answer question above about the exact line to comment out of litecoin-qt.pro it is line 115

https://github.com/litecoin-project/litecoin/blob/master-0.8/bitcoin-qt.pro#L115

When building boost 1_55_0 in your deps folder are you using these commands ?

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


Again, for alt coins and older codebases  i strongly suggest you build a non static (one that requires dll files) first before you try the static wallet. If this builds and works ok you know at least you have a foundation to work from.


To answer your question about why building wallets on win is generally more difficult than linux there are many reasons for this.

Obviously linux is much easier.

If you cannot make the qt are you able to compile a litecoind that works properly ?

Also I suggest you start a thread in the alt coin section of the this forum , building alt coins is off topic here and I feel I am breaking the rules posting replies.

Finally remember making your own wallet is something that needs to be done with care , practice and skill since if you find out a few months after you built it that something is broken you could have difficulty.  If the coin you are using has builds released by the development team of the coin I strongly suggest other than for learning code, practice and general study/research to always use official builds for any coin wallet you plan to hold anything serious in. 


it is line
Thank you for your advice altcoinex, I will try that when I get home.

small edit:
I never heard/read anything about this line "CONFIG += static". I will keep you posted if this works out or not.
LOL I thought you meant something else  Grin Yes I have this in the .pro file already  Wink

It seems my "error" has been there for years on other coins as well.. This is not a litecoin problem though.. or bitcoin. I am certain it must be something with my pc. I tried googling this issue, and found a few articles. But none of the articles I read offer a solution.  I guess I will try a clean build windows next. Since win7 did not work out for me. I will try it with 8.1 next. Now that were talking windows here a little bit. What is the recommended windows version to compile wallets with?
legendary
Activity: 1526
Merit: 1002
Chipcoin Developer
Thank you for your advice altcoinex, I will try that when I get home.

small edit:
I never heard/read anything about this line "CONFIG += static". I will keep you posted if this works out or not.
LOL I thought you meant something else  Grin Yes I have this in the .pro file already  Wink

It seems my "error" has been there for years on other coins as well.. This is not a litecoin problem though.. or bitcoin. I am certain it must be something with my pc. I tried googling this issue, and found a few articles. But none of the articles I read offer a solution.  I guess I will try a clean build windows next. Since win7 did not work out for me. I will try it with 8.1 next. Now that were talking windows here a little bit. What is the recommended windows version to compile wallets with?
sr. member
Activity: 293
Merit: 251
Director - www.cubeform.io
Getting a clean compile, but an executable that crashes with the following error:

"EXCEPTION: N5boost10filesystem16filesystem_errorE
boost::filesystem::status: The operation completed successfully: "C:
\Users\Deacon\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup\Mooncoin.lnk"
C:\deps\mooncoin\release\mooncoin-qt.exe in Runaway exception"

Any ideas or suggestions?

I'm too getting this now. What to do?

This stuff is driving me batty.

EDIT 2:

 the exception is thrown by Boost's filesystem::exists and ::remove functions.
I've no idea what causes it to break havoc on some builds and not on others...
I tried with Boost 1.55 and 1.57 and both gave the same result.
In this particular case got around it by putting try-catch statements around the problematic lines,
but it can avoided also by using non-throwing overloaded functions of the same name.



I am having  the exact same issue atm. Anyone with a fix for this?


Cinnamon_carter, I recompiled everything using mingw46 and qt485, but that gives me some serious issues with berkelydb compiling. However, I worked around that issue by downloading Easywinbuilder and update the deps and specification files to todays standard and my correct mingw/mingw32 folder. Which seemed to work. I changed easywinbuilder files in such a way I can now build static wallets with it  Cheesy However, the same problem as compiling by hand occurs when opening the qt.exe


It seems to be an issue with boost. I compiled 1_55 and 1_53. But they give the same result when opening the qt.exe
Code:
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::status: De bewerking is voltooid: "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Litecoin.lnk"      
Z:\litecoin\release\litecoin-qt.exe in Runaway exception  

After that I compiled boost 1_53 full.. including the -sd- -s- -mt-s- -d- -1- etc in /stage/lib (I saw your photon.pro was using -sd-)
but that didnt work either. Why the hell isnt windows as easy going as linux?  Embarrassed

I have this issue with both Bitcoin and litecoin qt


I do know boost throws these under circumstances such as it trying to open a file that's already open/locked as well as if it does not have permissions. I wonder if either of those might be related to the issue as opposed to boost itself.... I have also read that these 'Exceptions' are often not accurate, and while it says 'The operation completed' it didn't and runs into some other issue it is not presenting. My input probably isn't very helpful but thought id add what I could to the thought pool....
full member
Activity: 131
Merit: 108
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).
sr. member
Activity: 293
Merit: 251
Director - www.cubeform.io
Cheers cinnamon_carter, your guide on cryptocointalk helped me a lot recently Cheesy

I will try that tonight when I get home from work. Non static wallets work, but give me an exit error (I thought that was a known issue for "older" coins?)

I forgot to say I already used a lot of different versions to compile though

mingw46/mingw49
QT 4.8.6/QT4.8.6 (static compile)/QT4.8.4/QT4.8.4 (static compile)
Boost 157/boost 155/boost 153 / I even tried with 154 which sucks lol
Installed all deps about 2x myself
Found and downloaded FooCoin-deps (outdated)
Found and downloaded CloneCoin-deps(These give me the error I guess, they are compiled with mingw49 I think)

Really annoying that you cant compile static if your boost for instance is compiled with some other version of mingw then the rest of the deps. sighs

I also tried crosscompiling with gitian, I found out that is definetly out of my leaque without a decent gitian compile for dummies guide.

Crosscompile on Ubuntu with /mxe/.../user/...../qmake created a static wallet for me, but I cant open it at all

As you can see I tried about 90% of the available options. and that explains how much time I lost already with recompiling all this stuff over and over again  Cheesy


I will try a fresh install of deps again and try it with mingw46 and QT 4.8.5.

I also tried to compile bitcoinQT which gives me the same error when static build, So I guess it is something with my deps folder/mingw/qt lol

To be continued  Grin



EDIT: Just have to say this is pretty hard for a non-coder  Smiley But I will not give up! I dont want to be dependent on releases anymore, I want to compile the wallets myself Wink Linux is no problem but windows is a real pain in the ass


I found something other in the litecoin.pro which confuses me.
https://github.com/litecoin-project/litecoin/blob/master-0.8/bitcoin-qt.pro#L107-L115

Which line do I comment out? I tried commenting out both, and one at a time. Not commenting out line 115 gives the compile error as expected. Commenting out both lines compiles. Commenting out line 115 but not 108 compiles too... (sorry if this may sound confusing) I doubt this is my problem though, since I had the same error with running bitcoin-qt



Line 115 is the line to comment out. Additionally, as par your static build issues, make sure you add
"CONFIG += static" to the file (line 11 would be a good place).
Also change line 51 from
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware
 to
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
(line numbers are based on the bitcoin-qt.pro you linked)
legendary
Activity: 1526
Merit: 1002
Chipcoin Developer
Getting a clean compile, but an executable that crashes with the following error:

"EXCEPTION: N5boost10filesystem16filesystem_errorE
boost::filesystem::status: The operation completed successfully: "C:
\Users\Deacon\AppData\Roaming\Microsoft\Windows\Start
Menu\Programs\Startup\Mooncoin.lnk"
C:\deps\mooncoin\release\mooncoin-qt.exe in Runaway exception"

Any ideas or suggestions?

I'm too getting this now. What to do?

This stuff is driving me batty.

EDIT 2:

 the exception is thrown by Boost's filesystem::exists and ::remove functions.
I've no idea what causes it to break havoc on some builds and not on others...
I tried with Boost 1.55 and 1.57 and both gave the same result.
In this particular case got around it by putting try-catch statements around the problematic lines,
but it can avoided also by using non-throwing overloaded functions of the same name.



I am having  the exact same issue atm. Anyone with a fix for this?


Cinnamon_carter, I recompiled everything using mingw46 and qt485, but that gives me some serious issues with berkelydb compiling. However, I worked around that issue by downloading Easywinbuilder and update the deps and specification files to todays standard and my correct mingw/mingw32 folder. Which seemed to work. I changed easywinbuilder files in such a way I can now build static wallets with it  Cheesy However, the same problem as compiling by hand occurs when opening the qt.exe


It seems to be an issue with boost. I compiled 1_55 and 1_53. But they give the same result when opening the qt.exe
Code:
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::status: De bewerking is voltooid: "C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Litecoin.lnk"      
Z:\litecoin\release\litecoin-qt.exe in Runaway exception  

After that I compiled boost 1_53 full.. including the -sd- -s- -mt-s- -d- -1- etc in /stage/lib (I saw your photon.pro was using -sd-)
but that didnt work either. Why the hell isnt windows as easy going as linux?  Embarrassed

I have this issue with both Bitcoin and litecoin qt
Pages:
Jump to: