I’m trying to build Bitcoin Source code v24.2 for Windows using WSL running Ubuntu (latest). I’m following the instructions instructions given the /doc/build-windows.md. I got linker errors:
/usr/bin/x86_64-w64-mingw32-ld: libbitcoin_node.a(libbitcoin_node_a-txindex.o):txindex.cpp:(.text+0x3009): undefined reference to `node::OpenBlockFile(FlatFilePos const&, bool)'
/usr/bin/x86_64-w64-mingw32-ld: libbitcoin_node.a(libbitcoin_node_a-coinstats.o):coinstats.cpp:(.text+0x13fc): undefined reference to `node::BlockManager::LookupBlockIndex(uint256 const&)'
/usr/bin/x86_64-w64-mingw32-ld: libbitcoin_zmq.a(libbitcoin_zmq_a-zmqpublishnotifier.o):zmqpublishnotifier.cpp:(.text+0x4c3d): undefined reference to `node::ReadBlockFromDisk(CBlock&, CBlockIndex const*, Consensus::Params const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7029: bench/bench_bitcoin.exe] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/madguy/BitcoinSetup/bitcoin/src'
make[1]: *** [Makefile:18981: all-recursive] Error 1
make[1]: Leaving directory '/home/madguy/BitcoinSetup/bitcoin/src'
make: *** [Makefile:824: all-recursive] Error 1
root@MadGuy:/home/madguy/BitcoinSetup/bitcoin# grep -r "ReadBlockFromDisk" .
I did:
root@MadGuy:/home/madguy/BitcoinSetup/bitcoin# grep -r "ReadBlockFromDisk" .
and got (and some more):
./src/node/blockstorage.h:bool ReadBlockFromDisk(CBlock& block, const FlatFilePos& pos, const Consensus::Params& consensusParams);
./src/node/blockstorage.h:bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams);
./src/node/blockstorage.cpp:bool ReadBlockFromDisk(CBlock& block, const FlatFilePos& pos, const Consensus::Params& consensusParams)
which means the headers and definitions exist (same goes for OpenBlockFile(…)). But they’ve no preprocessors either, I’m not sure what can cause this issue. Please help, it’s kinda urgent.












