bitcoin core development – so many “undefined reference to” after I add some codes, how to solve it?

I am just want to modify the hash algorithm of bitcoin-0.20 and I want to replace the previous hash algorithm to the x13hash algorithm. So I modify the source below,

1, I add the x13hash files to the bitcoin-0.20/src/crypto/x13hash, there are files below:

aes_helper.c  bmw.c       echo.c   groestl.c  hamsi_helper.c  keccak.c  shavite.c  skein.c  sph_blake.h  sph_cubehash.h  sph_fugue.h    sph_hamsi.h  sph_keccak.h  sph_shavite.h  sph_skein.h  sph_types.h
blake.c       cubehash.c  fugue.c  hamsi.c    jh.c            luffa.c   simd.c     sm3.c    sph_bmw.h    sph_echo.h      sph_groestl.h  sph_jh.h     sph_luffa.h   sph_simd.h     sph_sm3.h

2, I add a new function in block.h below

class CBlockHeader
{
public:
    // header
    int32_t nVersion;
    uint256 hashPrevBlock;
    uint256 hashMerkleRoot;
    uint32_t nTime;
    uint32_t nBits;
    uint32_t nNonce;

    CBlockHeader()
    {
        SetNull();
    }

    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action) {
        READWRITE(this->nVersion);
        READWRITE(hashPrevBlock);
        READWRITE(hashMerkleRoot);
        READWRITE(nTime);
        READWRITE(nBits);
        READWRITE(nNonce);
    }

    void SetNull()
    {
        nVersion = 0;
        hashPrevBlock.SetNull();
        hashMerkleRoot.SetNull();
        nTime = 0;
        nBits = 0;
        nNonce = 0;
    }

    bool IsNull() const
    {
        return (nBits == 0);
    }

    uint256 GetHash() const;
    uint256 GetNewPoWHash() const; //new hash function

    int64_t GetBlockTime() const
    {
        return (int64_t)nTime;
    }
};

3, add the function in block.cpp

#include <hash.h>
#include <tinyformat.h>

#define BEGIN(a)            ((char*)&(a))
#define END(a)              ((char*)&((&(a))(1)))
#define UBEGIN(a)           ((unsigned char*)&(a))
#define UEND(a)             ((unsigned char*)&((&(a))(1)))
#define ARRAYLEN(array)     (sizeof(array)/sizeof((array)(0)))

uint256 CBlockHeader::GetHash() const
{
    return SerializeHash(*this);
}
uint256 CBlockHeader::GetNewPoWHash() const //new !! 
{   
    return HashX13sm3(BEGIN(nVersion), END(nNonce));
}
  1. modify the hash.h below:

     #include <vector>
     // added new
     #include "crypto/x13hash/sph_blake.h"
     #include "crypto/x13hash/sph_bmw.h"
     #include "crypto/x13hash/sph_groestl.h"
     #include "crypto/x13hash/sph_jh.h"
     #include "crypto/x13hash/sph_keccak.h"
     #include "crypto/x13hash/sph_skein.h"
     #include "crypto/x13hash/sph_luffa.h"
     #include "crypto/x13hash/sph_cubehash.h"
     #include "crypto/x13hash/sph_shavite.h"
     #include "crypto/x13hash/sph_simd.h"
     #include "crypto/x13hash/sph_echo.h"
     #include "crypto/x13hash/sph_hamsi.h"
     #include "crypto/x13hash/sph_fugue.h"
     #include "crypto/x13hash/sph_sm3.h"
    
     #ifdef GLOBALDEFINED
     #define GLOBAL
     #else
     #define GLOBAL extern
     #endif
    
     GLOBAL sph_blake512_context     z_blake;
     GLOBAL sph_bmw512_context       z_bmw;
     GLOBAL sph_groestl512_context   z_groestl;
     GLOBAL sph_jh512_context        z_jh;
     GLOBAL sph_keccak512_context    z_keccak;
     GLOBAL sph_skein512_context     z_skein;
     GLOBAL sph_luffa512_context     z_luffa;
     GLOBAL sph_cubehash512_context  z_cubehash;
     GLOBAL sph_shavite512_context   z_shavite;
     GLOBAL sph_simd512_context      z_simd;
     GLOBAL sph_echo512_context      z_echo;
     GLOBAL sph_hamsi512_context     z_hamsi;
     GLOBAL sph_fugue512_context     z_fugue;
     #define fillz() do { 
         sph_blake512_init(&z_blake); 
         sph_bmw512_init(&z_bmw); 
         sph_groestl512_init(&z_groestl); 
         sph_jh512_init(&z_jh); 
         sph_keccak512_init(&z_keccak); 
         sph_skein512_init(&z_skein); 
         sph_luffa512_init(&z_luffa); 
         sph_cubehash512_init(&z_cubehash); 
         sph_shavite512_init(&z_shavite); 
         sph_simd512_init(&z_simd); 
         sph_echo512_init(&z_echo); 
         sph_hamsi512_init(&z_hamsi); 
         sph_fugue512_init(&z_fugue); 
     } while (0) 
     typedef uint256 ChainCode;
     template<typename T1>
    

    inline uint256 HashX13(const T1 pbegin, const T1 pend)

    {
    sph_blake512_context ctx_blake;
    sph_bmw512_context ctx_bmw;
    sph_groestl512_context ctx_groestl;
    sph_jh512_context ctx_jh;
    sph_keccak512_context ctx_keccak;
    sph_skein512_context ctx_skein;
    sph_luffa512_context ctx_luffa;
    sph_cubehash512_context ctx_cubehash;
    sph_shavite512_context ctx_shavite;
    sph_simd512_context ctx_simd;
    sph_echo512_context ctx_echo;
    sph_hamsi512_context ctx_hamsi;
    sph_fugue512_context ctx_fugue;
    static unsigned char pblank(1);

    #ifndef QT_NO_DEBUG
    //std::string strhash;
    //strhash = “”;
    #endif

     uint256 hash(34);
    
     sph_blake512_init(&ctx_blake);
     sph_blake512 (&ctx_blake, (pbegin == pend ? pblank : static_cast<const void*>(&pbegin(0))), (pend - pbegin) * sizeof(pbegin(0)));
     sph_blake512_close(&ctx_blake, static_cast<void*>(&hash(0)));
    
     sph_bmw512_init(&ctx_bmw);
     sph_bmw512 (&ctx_bmw, static_cast<const void*>(&hash(0)), 64);
     sph_bmw512_close(&ctx_bmw, static_cast<void*>(&hash(2)));
    
     sph_groestl512_init(&ctx_groestl);
     sph_groestl512 (&ctx_groestl, static_cast<const void*>(&hash(2)), 64);
     sph_groestl512_close(&ctx_groestl, static_cast<void*>(&hash(4)));
    
     sph_skein512_init(&ctx_skein);
     sph_skein512 (&ctx_skein, static_cast<const void*>(&hash(4)), 64);
     sph_skein512_close(&ctx_skein, static_cast<void*>(&hash(6)));
    
     sph_jh512_init(&ctx_jh);
     sph_jh512 (&ctx_jh, static_cast<const void*>(&hash(6)), 64);
     sph_jh512_close(&ctx_jh, static_cast<void*>(&hash(8)));
    
     sph_keccak512_init(&ctx_keccak);
     sph_keccak512 (&ctx_keccak, static_cast<const void*>(&hash(8)), 64);
     sph_keccak512_close(&ctx_keccak, static_cast<void*>(&hash(10)));
    
     sph_luffa512_init(&ctx_luffa);
     sph_luffa512 (&ctx_luffa, static_cast<void*>(&hash(10)), 64);
     sph_luffa512_close(&ctx_luffa, static_cast<void*>(&hash(12)));
    
     sph_cubehash512_init(&ctx_cubehash);
     sph_cubehash512 (&ctx_cubehash, static_cast<const void*>(&hash(12)), 64);
     sph_cubehash512_close(&ctx_cubehash, static_cast<void*>(&hash(14)));
    
     sph_shavite512_init(&ctx_shavite);
     sph_shavite512(&ctx_shavite, static_cast<const void*>(&hash(14)), 64);
     sph_shavite512_close(&ctx_shavite, static_cast<void*>(&hash(16)));
    
     sph_simd512_init(&ctx_simd);
     sph_simd512 (&ctx_simd, static_cast<const void*>(&hash(16)), 64);
     sph_simd512_close(&ctx_simd, static_cast<void*>(&hash(18)));
    
     sph_echo512_init(&ctx_echo);
     sph_echo512 (&ctx_echo, static_cast<const void*>(&hash(18)), 64);
     sph_echo512_close(&ctx_echo, static_cast<void*>(&hash(20)));
    
     sph_hamsi512_init(&ctx_hamsi);
     sph_hamsi512 (&ctx_hamsi, static_cast<const void*>(&hash(20)), 64);
     sph_hamsi512_close(&ctx_hamsi, static_cast<void*>(&hash(22)));
    
     sph_fugue512_init(&ctx_fugue);
     sph_fugue512 (&ctx_fugue, static_cast<const void*>(&hash(22)), 64);
     sph_fugue512_close(&ctx_fugue, static_cast<void*>(&hash(24)));
    
    
     return hash(24);
    

    }

template
inline uint256 HashX13sm3(const T1 pbegin, const T1 pend)
{
sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sm3_ctx_t ctx_sm3;
sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo;
sph_hamsi512_context ctx_hamsi;
sph_fugue512_context ctx_fugue;
static unsigned char pblank(1);

#ifndef QT_NO_DEBUG
//std::string strhash;
//strhash = “”;
#endif

uint256 hash(34);

sph_blake512_init(&ctx_blake);
sph_blake512 (&ctx_blake, (pbegin == pend ? pblank : static_cast<const void*>(&pbegin(0))), (pend - pbegin) * sizeof(pbegin(0)));
sph_blake512_close(&ctx_blake, static_cast<void*>(&hash(0)));

sph_bmw512_init(&ctx_bmw);
sph_bmw512 (&ctx_bmw, static_cast<const void*>(&hash(0)), 64);
sph_bmw512_close(&ctx_bmw, static_cast<void*>(&hash(2)));

    sph_groestl512_init(&ctx_groestl);
    sph_groestl512 (&ctx_groestl, static_cast<const void*>(&hash(2)), 64);
    sph_groestl512_close(&ctx_groestl, static_cast<void*>(&hash(4)));

    sph_skein512_init(&ctx_skein);
    sph_skein512 (&ctx_skein, static_cast<const void*>(&hash(4)), 64);
    sph_skein512_close(&ctx_skein, static_cast<void*>(&hash(6)));

    sph_jh512_init(&ctx_jh);
    sph_jh512 (&ctx_jh, static_cast<const void*>(&hash(6)), 64);
    sph_jh512_close(&ctx_jh, static_cast<void*>(&hash(8)));

    sph_keccak512_init(&ctx_keccak);
    sph_keccak512 (&ctx_keccak, static_cast<const void*>(&hash(8)), 64);
    sph_keccak512_close(&ctx_keccak, static_cast<void*>(&hash(10)));

    hash(12).SetNull(); //sm3 is 256bit, just in case
    hash(13).SetNull();
    sm3_init(&ctx_sm3);
    sph_sm3(&ctx_sm3, static_cast<const void*>(&hash(10)), 64);
    sph_sm3_close(&ctx_sm3, static_cast<void*>(&hash(12)));

    sph_cubehash512_init(&ctx_cubehash);
    sph_cubehash512 (&ctx_cubehash, static_cast<const void*>(&hash(12)), 64);
    sph_cubehash512_close(&ctx_cubehash, static_cast<void*>(&hash(14)));

    sph_shavite512_init(&ctx_shavite);
    sph_shavite512(&ctx_shavite, static_cast<const void*>(&hash(14)), 64);
    sph_shavite512_close(&ctx_shavite, static_cast<void*>(&hash(16)));

    sph_simd512_init(&ctx_simd);
    sph_simd512 (&ctx_simd, static_cast<const void*>(&hash(16)), 64);
    sph_simd512_close(&ctx_simd, static_cast<void*>(&hash(18)));

    sph_echo512_init(&ctx_echo);
    sph_echo512 (&ctx_echo, static_cast<const void*>(&hash(18)), 64);
    sph_echo512_close(&ctx_echo, static_cast<void*>(&hash(20)));

    sph_hamsi512_init(&ctx_hamsi);
    sph_hamsi512 (&ctx_hamsi, static_cast<const void*>(&hash(20)), 64);
    sph_hamsi512_close(&ctx_hamsi, static_cast<void*>(&hash(22)));

    sph_fugue512_init(&ctx_fugue);
    sph_fugue512 (&ctx_fugue, static_cast<const void*>(&hash(22)), 64);
    sph_fugue512_close(&ctx_fugue, static_cast<void*>(&hash(24)));


    return hash(24);
} /* added new above */
typedef uint256 ChainCode;  

Finally then I make again ,it shows error below:

CXX      script/libbitcoin_common_a-descriptor.o
  CXX      script/libbitcoin_common_a-sign.o
  CXX      script/libbitcoin_common_a-signingprovider.o
  CXX      script/libbitcoin_common_a-standard.o
  AR       libbitcoin_util.a
  AR       libbitcoin_consensus.a
  AR       libbitcoin_wallet_tool.a
  AR       libtest_util.a
  CXXLD    libbitcoinconsensus.la
  AR       libbitcoin_server.a
  AR       libbitcoin_wallet.a
  AR       libbitcoin_common.a
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-wallet
  CXXLD    bitcoind
  CXXLD    test/test_bitcoin
/usr/bin/ld: libbitcoin_consensus.a(libbitcoin_consensus_a-block.o): in function `uint256 HashX13sm3<char*>(char*, char*)':
/home/gilsun91/bitcoin-0.20/src/./hash.h:178: undefined reference to `sph_blake512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:179: undefined reference to `sph_blake512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:180: undefined reference to `sph_blake512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:182: undefined reference to `sph_bmw512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:183: undefined reference to `sph_bmw512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:184: undefined reference to `sph_bmw512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:186: undefined reference to `sph_groestl512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:187: undefined reference to `sph_groestl512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:188: undefined reference to `sph_groestl512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:190: undefined reference to `sph_skein512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:191: undefined reference to `sph_skein512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:192: undefined reference to `sph_skein512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:194: undefined reference to `sph_jh512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:195: undefined reference to `sph_jh512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:196: undefined reference to `sph_jh512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:198: undefined reference to `sph_keccak512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:199: undefined reference to `sph_keccak512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:200: undefined reference to `sph_keccak512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:204: undefined reference to `sm3_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:205: undefined reference to `sph_sm3'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:206: undefined reference to `sph_sm3_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:208: undefined reference to `sph_cubehash512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:209: undefined reference to `sph_cubehash512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:210: undefined reference to `sph_cubehash512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:212: undefined reference to `sph_shavite512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:213: undefined reference to `sph_shavite512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:214: undefined reference to `sph_shavite512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:216: undefined reference to `sph_simd512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:217: undefined reference to `sph_simd512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:218: undefined reference to `sph_simd512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:220: undefined reference to `sph_echo512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:221: undefined reference to `sph_echo512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:222: undefined reference to `sph_echo512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:224: undefined reference to `sph_hamsi512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:225: undefined reference to `sph_hamsi512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:226: undefined reference to `sph_hamsi512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:228: undefined reference to `sph_fugue512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:229: undefined reference to `sph_fugue512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:230: undefined reference to `sph_fugue512_close'
collect2: error: ld returned 1 exit status
make(2): *** (Makefile:7370: bitcoin-tx) Error 1
make(2): *** Waiting for unfinished jobs....
/usr/bin/ld: libbitcoin_consensus.a(libbitcoin_consensus_a-block.o): in function `uint256 HashX13sm3<char*>(char*, char*)':
/home/gilsun91/bitcoin-0.20/src/./hash.h:178: undefined reference to `sph_blake512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:179: undefined reference to `sph_blake512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:180: undefined reference to `sph_blake512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:182: undefined reference to `sph_bmw512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:183: undefined reference to `sph_bmw512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:184: undefined reference to `sph_bmw512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:186: undefined reference to `sph_groestl512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:187: undefined reference to `sph_groestl512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:188: undefined reference to `sph_groestl512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:190: undefined reference to `sph_skein512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:191: undefined reference to `sph_skein512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:192: undefined reference to `sph_skein512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:194: undefined reference to `sph_jh512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:195: undefined reference to `sph_jh512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:196: undefined reference to `sph_jh512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:198: undefined reference to `sph_keccak512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:199: undefined reference to `sph_keccak512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:200: undefined reference to `sph_keccak512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:204: undefined reference to `sm3_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:205: undefined reference to `sph_sm3'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:206: undefined reference to `sph_sm3_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:208: undefined reference to `sph_cubehash512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:209: undefined reference to `sph_cubehash512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:210: undefined reference to `sph_cubehash512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:212: undefined reference to `sph_shavite512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:213: undefined reference to `sph_shavite512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:214: undefined reference to `sph_shavite512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:216: undefined reference to `sph_simd512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:217: undefined reference to `sph_simd512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:218: undefined reference to `sph_simd512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:220: undefined reference to `sph_echo512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:221: undefined reference to `sph_echo512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:222: undefined reference to `sph_echo512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:224: undefined reference to `sph_hamsi512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:225: undefined reference to `sph_hamsi512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:226: undefined reference to `sph_hamsi512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:228: undefined reference to `sph_fugue512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:229: undefined reference to `sph_fugue512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:230: undefined reference to `sph_fugue512_close'
collect2: error: ld returned 1 exit status
make(2): *** (Makefile:7374: bitcoin-wallet) Error 1
/usr/bin/ld: libbitcoin_consensus.a(libbitcoin_consensus_a-block.o): in function `uint256 HashX13sm3<char*>(char*, char*)':
/home/gilsun91/bitcoin-0.20/src/./hash.h:178: undefined reference to `sph_blake512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:179: undefined reference to `sph_blake512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:180: undefined reference to `sph_blake512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:182: undefined reference to `sph_bmw512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:183: undefined reference to `sph_bmw512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:184: undefined reference to `sph_bmw512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:186: undefined reference to `sph_groestl512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:187: undefined reference to `sph_groestl512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:188: undefined reference to `sph_groestl512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:190: undefined reference to `sph_skein512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:191: undefined reference to `sph_skein512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:192: undefined reference to `sph_skein512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:194: undefined reference to `sph_jh512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:195: undefined reference to `sph_jh512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:196: undefined reference to `sph_jh512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:198: undefined reference to `sph_keccak512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:199: undefined reference to `sph_keccak512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:200: undefined reference to `sph_keccak512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:204: undefined reference to `sm3_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:205: undefined reference to `sph_sm3'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:206: undefined reference to `sph_sm3_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:208: undefined reference to `sph_cubehash512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:209: undefined reference to `sph_cubehash512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:210: undefined reference to `sph_cubehash512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:212: undefined reference to `sph_shavite512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:213: undefined reference to `sph_shavite512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:214: undefined reference to `sph_shavite512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:216: undefined reference to `sph_simd512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:217: undefined reference to `sph_simd512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:218: undefined reference to `sph_simd512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:220: undefined reference to `sph_echo512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:221: undefined reference to `sph_echo512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:222: undefined reference to `sph_echo512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:224: undefined reference to `sph_hamsi512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:225: undefined reference to `sph_hamsi512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:226: undefined reference to `sph_hamsi512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:228: undefined reference to `sph_fugue512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:229: undefined reference to `sph_fugue512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:230: undefined reference to `sph_fugue512_close'
collect2: error: ld returned 1 exit status
make(2): *** (Makefile:7378: bitcoind) Error 1
/usr/bin/ld: libbitcoin_consensus.a(libbitcoin_consensus_a-block.o): in function `uint256 HashX13sm3<char*>(char*, char*)':
/home/gilsun91/bitcoin-0.20/src/./hash.h:178: undefined reference to `sph_blake512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:179: undefined reference to `sph_blake512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:180: undefined reference to `sph_blake512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:182: undefined reference to `sph_bmw512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:183: undefined reference to `sph_bmw512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:184: undefined reference to `sph_bmw512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:186: undefined reference to `sph_groestl512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:187: undefined reference to `sph_groestl512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:188: undefined reference to `sph_groestl512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:190: undefined reference to `sph_skein512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:191: undefined reference to `sph_skein512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:192: undefined reference to `sph_skein512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:194: undefined reference to `sph_jh512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:195: undefined reference to `sph_jh512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:196: undefined reference to `sph_jh512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:198: undefined reference to `sph_keccak512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:199: undefined reference to `sph_keccak512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:200: undefined reference to `sph_keccak512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:204: undefined reference to `sm3_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:205: undefined reference to `sph_sm3'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:206: undefined reference to `sph_sm3_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:208: undefined reference to `sph_cubehash512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:209: undefined reference to `sph_cubehash512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:210: undefined reference to `sph_cubehash512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:212: undefined reference to `sph_shavite512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:213: undefined reference to `sph_shavite512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:214: undefined reference to `sph_shavite512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:216: undefined reference to `sph_simd512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:217: undefined reference to `sph_simd512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:218: undefined reference to `sph_simd512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:220: undefined reference to `sph_echo512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:221: undefined reference to `sph_echo512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:222: undefined reference to `sph_echo512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:224: undefined reference to `sph_hamsi512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:225: undefined reference to `sph_hamsi512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:226: undefined reference to `sph_hamsi512_close'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:228: undefined reference to `sph_fugue512_init'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:229: undefined reference to `sph_fugue512'
/usr/bin/ld: /home/gilsun91/bitcoin-0.20/src/./hash.h:230: undefined reference to `sph_fugue512_close'

java – Remove Minecraft formatting codes from a String

I obtain strings that contain chat messages, and they sometimes have formatting codes imbedded in them. A formatting code is a § followed by a character, and this character then defines how the code will affect the following text. Colour codes can occur at the very end of the String, a common case of a message would be:

"§r§aThis is a message.§r§bAnd this is blue...§r"

Currently I’m using this method, which simply iterates over the String and skips another character when it encounters a §. Is this a good solution, and how can I further improve it?

private String cleanFormattingCodes(String message) {
    StringBuilder newMessage = new StringBuilder();
    for (int i = 0; i < message.length(); i++) {
      char c = message.charAt(i);
      if (c == '§') {
        i++;
        continue;
      }

      newMessage.append(c);
    }
    return newMessage.toString();
  }

How many unique Huffman codes can you make. Image I has size 256×256 and has pixels of values 50,100 and 200

Let I (M x N) be an image made only of 3 pixels, how many unique Huffman code can you make (example: Image I has size 256×256, and has pixels of values 50,100 and 200).

If someone can help me how to solve this problem or give me a hint.

How many unique Huffman codes can you make. Image I has size 256×256 and 3 pixels, and has pixels of values 50,100 and 200

Let I (M x N) be an image made only of 3 pixels, how many unique Huffman code can you make (example: Image I has size 256×256, and has pixels of values 50,100 and 200).

If someone can help me how to solve this problem or give me a hint.

Advanced Bb Codes Pack

Admin submitted a new resource:

Advanced Bb Codes Pack – Accordion, tabs, and more

Features

  • Per-style option to add a word counter to the editor
  • Various bb-codes which support complex layout.
  • Support for making (size) and (ident) bb-codes output rem units instead of px (allows font-scaling)
  • Allow users to convert transparent colored post text into an inline-spoiler
  • Change admin bb-code page to sort bb-code by title, not tag

Supports the…

Read more

.(tagsToTranslate)null scripts(t)nulled(t)nulled sites(t)nulled forum(t)nulled script(t)nulled scripts(t)nulled script forum(t)best nulled scripts site(t)xenforo nulled(t)xenforo 2 nulled(t)xenforo nulled themes(t)seo xenforo 2(t)xenforo themes(t)seo for xenforo(t)vbulletin nulled(t)vbulletin 5 nulled(t)whmcs nulled(t)hexa whmcs(t)whmcs addons nulled(t)whmcs templates nulled(t)whmcs template nulled(t)whmcs modules nulled(t)whmcs themes nulled(t)cs-cart nulled(t)xfilesharing pro nulled(t)blesta nulled(t)arrowchat nulled(t)multi vendor ecommerce script nulled(t)seo providers(t)adsense alternative

cart – Magento2.4.2 Checkout Infinite loop detected When Using Discount Codes

cart – Magento2.4.2 Checkout Infinite loop detected When Using Discount Codes – Magento Stack Exchange

iphone – Does macOS Photos have a QR code reader built in somehow, does it decode codes in images?

I just imported a group of photos from my iPhone to Photos in macOS and the application “hiccuped” twice at the point where it read in two images of complicated QR-codes.

“hiccuped” = sort-of flashed another window that was too fast to see, or at least redrew the screen.

If Photos somehow detects a QR code and processes it to store the results for searching or indexing, I suppose that might explain it.

Photos 5.0, macOS 10.15.7

plugins – WordPress fatal error from php protocol codes

This is the website link: dormireacuba .it/

When I’m trying to visit this site then just showing some fatal errors

Fatal error: Uncaught Error: Call to undefined function wp_fix_server_vars() in /web/htdocs/www.dormireacuba.it/home/wp-settings.php:128 Stack trace: #0 /web/htdocs/www.dormireacuba.it/home/wp-config.php(209): require_once() #1 /web/htdocs/www.dormireacuba.it/home/wp-load.php(37): require_once('/web/htdocs/www...') #2 /web/htdocs/www.dormireacuba.it/home/wp-blog-header.php(13): require_once('/web/htdocs/www...') #3 /web/htdocs/www.dormireacuba.it/home/index.php(140): require('/web/htdocs/www...') #4 {main} thrown in /web/htdocs/www.dormireacuba.it/home/wp-settings.php on line 128

Fatal error: Uncaught Error: Call to undefined function wp_get_server_protocol() in /web/htdocs/www.dormireacuba.it/home/wp-includes/functions.php:1412 Stack trace: #0 /web/htdocs/www.dormireacuba.it/home/wp-includes/functions.php(3474): status_header(500) #1 /web/htdocs/www.dormireacuba.it/home/wp-includes/functions.php(3421): _default_wp_die_handler('<div class="wp-...', 'WordPress &rsaq...', Array) #2 /web/htdocs/www.dormireacuba.it/home/wp-includes/class-wp-fatal-error-handler.php(233): wp_die(Object(WP_Error), '', Array) #3 /web/htdocs/www.dormireacuba.it/home/wp-includes/class-wp-fatal-error-handler.php(152): WP_Fatal_Error_Handler->display_default_error_template(Array, false) #4 /web/htdocs/www.dormireacuba.it/home/wp-includes/class-wp-fatal-error-handler.php(57): WP_Fatal_Error_Handler->display_error_template(Array, false) #5 (internal function): WP_Fatal_Error_Handler->handle() #6 {main} thrown in /web/htdocs/www.dormireacuba.it/home/wp-includes/functions.php on line 1412

The code is from wp-settings.php on line 128

wp_fix_server_vars();

and The code is from wp-includes/functions.php on line 1412

$protocol      = wp_get_server_protocol();

Please help me to solve this problem.

algorithms – Can Someone help me to find what’s different between those two codes?

I have spent an hour but did not find why both of the codes giving different outputs. The problem is to colour different cities using graphs.
and the inputs are:
3 2
1 2
2 3

where the first code gives 900 output and the second one gives 600 only.

First Code with Correct Output:

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define no 0;
#define red 1;
#define black 2;
vector<int> vec(100005);
queue<int> q;
int n, e, sum = 0, sum1 = 0;
int col(100005);

void mintk()
{
    col(1) = red;
    sum = sum + 200;
    sum1 = sum1 + 500;
    q.push(1);
    int u, v;
    while (!q.empty())
    {
        u = q.front();
        q.pop();
        for (int i = 0; i < vec(u).size(); i++)
        {
            v = vec(u)(i);
            if (col(v) == 0)
            {
                if (col(u) == 2)
                {
                    col(v) = red;
                    sum = sum + 200;
                    sum1 = sum1 + 500;
                }
                else if (col(u) == 1)
                {
                    col(v) = black;
                    sum = sum + 500;
                    sum1 = sum1 + 200;
                }
                q.push(v);
            }
        }
    }
    if (sum <= sum1)
        cout << sum;
    else if (sum > sum1)
        cout << sum1;
}
int main()
{
    cin >> n >> e;
    int v, u;
    for (int i = 0; i < e; i++)
    {
        cin >> u >> v;
        vec(u).push_back(v);
        if (u != v)
            vec(v).push_back(u);
    }
    mintk();
}

Second Code with Wrong Output:

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define RED 1;
#define BLACK 2;
#define UC 0;

vector <int> adj(100005);
queue <int> q;
int vertex, edge, red = 0, black = 0;

int col(100005);

void minCost(){

    col(1) = RED;
    red = red + 200;
    black = black + 500;

    q.push(1);
    int u,v;
    while(!q.empty()) {
        u = q.front();
        q.pop();

        for (int i = 0; i < adj(u).size(); i++)
        {
            v = adj(u)(i);

            if(col(v) == 0){
                if (col(u) == 2)
                {
                   col(v) = RED;
                   red = red + 200;
                   black = black + 500;
                }
                else if (col(u) == 1){
                    col(v) = BLACK;
                    red = red + 200;
                    black = black + 500;
                }
                q.push(v);
            }
        }
        
    }
    if (black<=red)
    {
        cout<<black;
    }
    else{
        cout << red;
    }
    
}


int main()
{
    cin >> vertex >> edge;
    int u, v;
    for (int i = 0; i < edge; i++)
    {
        cin >> u >> v;
        adj(u).push_back(v);
        if (u != v)
        {
            adj(v).push_back(u);
        }
    }

    minCost();
    // return 0;
}

Rust: lazy_static the strings from evdev codes

So I have this piece of code that produces following error:

cannot return value referencing local variable `key_name`
returns a value referencing data owned by the current function

I want it to evaluate the Key range and produce a map of strings, but it fails on the line map. I can’t seem to set up the ownership right. This is what I came up with:

use std::collections::HashMap;

use evdev::Key;

const KEY_RANGE_START : Key = Key::KEY_ESC;
const KEY_RANGE_END : Key = Key::KEY_SLASH;

const KEY_RANGE_COUNT: u16 = KEY_RANGE_END.code() - KEY_RANGE_START.code();

use lazy_static::lazy_static;

lazy_static! {
    static ref KEY_NAMES: HashMap<u16, &'static str> = {
        let mut map = HashMap::new();
        
        for index in 0..KEY_RANGE_COUNT {
            let code = index+KEY_RANGE_START.code();
            let key = Key::new(code);
            let key_name = format!("{:?}", key);

            let short_key_name = key_name.strip_prefix("KEY_").unwrap();

            map.insert(code, short_key_name.clone());
        }

        map
    };
}

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheap USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Best Quality USA Private Proxies