Pages:
Author

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

staff
Activity: 3458
Merit: 6793
Just writing some code
This guide is quite outdated now and no longer really accurate, thus I will be locking it as it is also attracting a lot of spam and off topic posts. Bitcoin Core Windows builds are cross compiled in an Ubuntu environment. Windows 10 has a feature called the Windows Subsystem for Linux which is essentially Ubuntu on Windows. Instructions for making Windows builds using the WSL are available here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md.
member
Activity: 92
Merit: 10
hey everyone i have been compiling qt4 wallets for a long while now and there is one thing that has been bothering me since i first got started and thats compiling wallets so they dont need the extra .dll files to run, i have added the following code to every .pro file and still it is hit and miss, sometimes it works and 99.9% of the time it does not work, is there an extra step i am missing? i compiled qt with the -static option and i add the CONFIG += static but again hit and miss

Code:
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static
newbie
Activity: 3
Merit: 0
Hi nitrogenetics,

Thanks for sharing the information.
I am looking for a similar guide for setting it all up on a linux(Fedora) system.

Do you have any reference?

I am absolutely new to the gamut of CryptoCurrency.

Regards
sr. member
Activity: 260
Merit: 251
Hi~ This is jungwoo

I don't know this situation...

https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479

2.7 Qt 5 libraries:

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

what is this??
Where do you type this sentence?
too long to explain environment variables in various versions of Windows, see:
https://www.google.com/search?site=&source=hp&q=in+Windows%2C+where+do+you+enter+environment+variables
Quote

I did this at the windows command prompt

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

I entered these things.
But I do not think so.
Where on earth are those things entered?
Oh, and
Qt5.3.2 version is no longer available for download, so I received 5.6.2 instead of replacing it?
Ron
newbie
Activity: 1
Merit: 0
Hi~ This is jungwoo

I don't know this situation...

https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479

2.7 Qt 5 libraries:

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

what is this??
Where do you type this sentence?

I did this at the windows command prompt

set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include
set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l

I entered these things.
But I do not think so.
Where on earth are those things entered?
Oh, and
Qt5.3.2 version is no longer available for download, so I received 5.6.2 instead of replacing it?
sr. member
Activity: 369
Merit: 252
Nice guide. Thank you.
Bit how its use for other protocol, example like x13?
How its use for altcoin?
full member
Activity: 278
Merit: 100
I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): 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 0x20 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:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./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_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./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/bi
n/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/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

Hi, how to solve this problem friend?
Code:
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../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.1/../../../../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\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1
staff
Activity: 3458
Merit: 6793
Just writing some code
i would like to compile the windows binaries in ubuntu, any useful guide??
There are instructions for cross compiling here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
sr. member
Activity: 378
Merit: 250
i would like to compile the windows binaries in ubuntu, any useful guide??
newbie
Activity: 35
Merit: 0
Hi All ! where I can download  wallet qt ?

Just to share.., the storage space of bitcoin wallet (bitcoin wallet) is divided into 2 types:
1. Online wallet (ewallet)
2. Wallet computer
Online wallet (ewallet) uses a website already provided by online wallet / wallet service providers. The computer wallet is installed on your computer. Both wallet / wallet above have their own weaknesses and advantages.

If you want to use bitcoin wallet immediately you can use online bitcoin storage service or called ewallet are:
1. Blockchain.info
2. Coinbase.com
3. Strongcoin.com
The above providers can be trusted.

Beside online wallet there are 2 ways to create a wallet computer:
1. Bitcoin.qt
2. Multibit

Bitcoin.qt is the original wallet that has a very complete function with excellent security. You can download the wallet here.. https://bitcoin.org/en/choose-your-wallet. It takes quite a long time to synchronize with the bitcoin network each time we use. File sizenya also very large reach up to tens of gigabite. While multibit is much different from bitcoin.qt. Multibit very light, speed and ease of use. The time required for synchronization in just minutes. I hope it’s help for some newbie.
sr. member
Activity: 284
Merit: 252
Hi All ! where I can download  wallet qt ?
sr. member
Activity: 249
Merit: 250
windows7 -- with secp256k1  ,the error as follow , how to fix it , thanks


Code:
./build\key.o:key.cpp:(.text+0x79a): undefined reference to `secp256k1_context_d
estroy'
./build\key.o:key.cpp:(.text+0x8b8): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0x8f3): undefined reference to `secp256k1_ecdsa_sig
n_recoverable'
./build\key.o:key.cpp:(.text+0x919): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0x98a): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0xa75): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0xa9d): undefined reference to `secp256k1_ecdsa_sig
n'
./build\key.o:key.cpp:(.text+0xadc): undefined reference to `secp256k1_ecdsa_sig
nature_serialize_der'
./build\key.o:key.cpp:(.text+0xe89): undefined reference to `secp256k1_ec_pubkey
_create'
./build\key.o:key.cpp:(.text+0xf3c): undefined reference to `secp256k1_ec_pubkey
_serialize'
./build\key.o:key.cpp:(.text+0x11a8): undefined reference to `secp256k1_ec_privk
ey_tweak_add'
./build\key.o:key.cpp:(.text+0x144a): undefined reference to `secp256k1_ec_secke
y_verify'
./build\key.o:key.cpp:(.text+0x15b2): undefined reference to `secp256k1_context_
create'
./build\key.o:key.cpp:(.text+0x15e0): undefined reference to `secp256k1_context_
randomize'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\key.o: bad reloc address 0x1c in section `.text$_ZN21LockedPag
eManagerBaseI16MemoryPageLockerE11UnlockRangeEPvj[__ZN21LockedPageManagerBaseI16
MemoryPageLockerE11UnlockRangeEPvj]'
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
member
Activity: 105
Merit: 10
Proteus?
Code:
include\QtGui" -I"..\Qt\4.8.6\include" -I"src" -I"src\json" -I"src\qt" -I"..\deps"
 -I"MINIUPNPC_LIB_PATH=C:\deps\miniupnpc" -I"src\leveldb\include" -I"src\leveldb
\helpers" -I"..\deps\boost_1_55_0" -I"..\deps\db-4.8.30.NC\build_unix" -I"..\dep
s\openssl-1.0.1j\include" -I"..\deps\qrencode-3.4.4" -I"..\Qt\4.8.6\include\Acti
veQt" -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-l
ibgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\clone
coin-qt.exe object_script.clonecoin-qt.Release  -L"c:\Qt\4.8.6\lib" -lmingwthrd
-lmingw32 -lqtmain build\bitcoin-qt_res.o -lqrencode -lminiupnpc -liphlpapi C:/C
lonecoin/src/leveldb/libleveldb.a C:/Clonecoin/src/leveldb/libmemenv.a -lshlwapi
 -LC:\deps\boost_1_55_0/stage/lib -LC:\deps\db-4.8.30.NC\build_unix -LC:\deps\op
enssl-1.0.1j -LC:\deps\qrencode-3.4.4\.libs -lssl -lcrypto -ldb_cxx -lshlwapi -l
mswsock -lboost_system-mgw49-mt-s-1_55 -lboost_filesystem-mgw49-mt-s-1_55 -lboos
t_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 -lwinm
m -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -lu
ser32 -lkernel32
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lminiupnpc
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\clonecoin-qt.exe' failed
mingw32-make: *** [release\clonecoin-qt.exe] Error 1

The above is the result when I compile in regular old Windows CMD with what you see below in my *coin-qt.pro file.

Code:
# 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


member
Activity: 105
Merit: 10
Proteus?
Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB

Which UPNP line? The one in *coinqt.pro? I tried that and it didn't overcome the problem for me: I'm using Windows 8.1 to do this, on normal Windows CMD and mingw49, boost 1.55..., miniupnpc.1.9.2015... db.4.8.30.NC, openssl-1.0.1j, Qt version 4.8.6
member
Activity: 105
Merit: 10
Proteus?
I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): 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 0x20 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:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./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_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./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/bi
n/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/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.


How did you get past this? I'm still stuck.  Your post doesn't tell me how to solve it, specifically you compiled the qt w/ out UPNP
hero member
Activity: 617
Merit: 531
Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB
newbie
Activity: 33
Merit: 0
I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): 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 0x20 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:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./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_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./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/bi
n/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/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.
newbie
Activity: 56
Merit: 0
Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.

i was able to do bitcoin 9 and 10 using the op!! .... ETC ethereum i might give it a whirl sometime ~ visual studio i'm going to check out BTC way too<<<
sr. member
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.
newbie
Activity: 56
Merit: 0
DOGE===> is it easy to build? Cool lol
Pages:
Jump to: