嘿 Stackoverflow 社区,现在我有以下问题:我想用 mac osx.10.11 编译 c++。但是每次我想编写代码时,它都会给我一个错误代码。我已经用谷歌搜索了,但我什么也没找到。
hashGenesisBlock = uint256("0x01");
if (true && genesis.GetHash() != hashGenesisBlock)
{
Logprintf("recalculating params for mainnet.\n");
Logprintf("old mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
Logprintf("old mainnet genesis hash: %s\n", hashGenesisBlock.ToString().c_str());
// deliberately empty for loop finds nonce value.
for(genesis.nNonce == 0; genesis.GetHash() > bnProofOfWorkLimit; genesis.nNonce++){ }
Logprintf("new mainnet genesis merkle root: %s\n", genesis.hashMerkleRoot.ToString().c_str());
Logprintf("new mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
Logprintf("new mainnet genesis hash: %s\n", genesis.GetHash().ToString().c_str());
}
错误信息:
Making all in src
CXX libgamebit_common_a-chainparams.o
chainparams.cpp:143:13: error: use of undeclared identifier 'Logprintf'
Logprintf("recalculating params for mainnet.\n");
^
chainparams.cpp:144:72: error: member reference base type 'uint32_t'
(aka 'unsigned int') is not a structure or union
...Logprintf("old mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c...
你有什么想法为什么我会得到这种错误?实际上我正在尝试编译bitcoind。
我希望你能帮助我。谢谢!