novacoin-project / novacoin

Novacoin sources tree
MIT License
114 stars 517 forks source link

BigNum error on compile #386

Closed ultra-pool closed 2 years ago

ultra-pool commented 4 years ago

bignum.h:589:61: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_is_prime(const BIGNUM, int, void ()(int, int, void), BN_CTX, void)’ int ret = BN_is_prime(this, checks, NULL, pctx, NULL); ^ bignum.h: In member function ‘bool CBigNum::isOne() const’: bignum.h:597:30: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_is_one(const BIGNUM)’ return BN_is_one(this); ^ bignum.h: In member function ‘bool CBigNum::operator!() const’: bignum.h:603:31: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_is_zero(const BIGNUM)’ return BN_is_zero(this); ^ bignum.h: In member function ‘CBigNum& CBigNum::operator+=(const CBigNum&)’: bignum.h:608:35: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_add(BIGNUM, const BIGNUM, const BIGNUM)’ if (!BN_add(this, this, &b)) ^ bignum.h: In member function ‘CBigNum& CBigNum::operator=(const CBigNum&)’: bignum.h:622:41: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_mul(BIGNUM, const BIGNUM, const BIGNUM, BN_CTX)’ if (!BN_mul(this, this, &b, pctx)) ^ bignum.h: In member function ‘CBigNum& CBigNum::operator<<=(unsigned int)’: bignum.h:641:41: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_lshift(BIGNUM, const BIGNUM, int)’ if (!BN_lshift(this, this, shift)) ^ bignum.h: In member function ‘CBigNum& CBigNum::operator>>=(unsigned int)’: bignum.h:652:28: error: cannot convert ‘CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ if (BN_cmp(&a, this) > 0) ^ bignum.h:658:41: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_rshift(BIGNUM, const BIGNUM, int)’ if (!BN_rshift(this, this, shift)) ^ bignum.h: In member function ‘CBigNum& CBigNum::operator++()’: bignum.h:667:47: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_add(BIGNUM, const BIGNUM, const BIGNUM)’ if (!BN_add(this, this, BN_value_one())) ^ bignum.h: In member function ‘CBigNum& CBigNum::operator--()’: bignum.h:684:45: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_sub(BIGNUM, const BIGNUM, const BIGNUM)’ if (!BN_sub(&r, this, BN_value_one())) ^ bignum.h: In function ‘const CBigNum operator+(const CBigNum&, const CBigNum&)’: bignum.h:711:27: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_add(BIGNUM, const BIGNUM, const BIGNUM)’ if (!BN_add(&r, &a, &b)) ^ bignum.h: In function ‘const CBigNum operator-(const CBigNum&, const CBigNum&)’: bignum.h:719:27: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_sub(BIGNUM, const BIGNUM, const BIGNUM)’ if (!BN_sub(&r, &a, &b)) ^ bignum.h: In function ‘const CBigNum operator-(const CBigNum&)’: bignum.h:727:43: error: cannot convert ‘CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_is_negative(const BIGNUM)’ BN_set_negative(&r, !BN_is_negative(&r)); ^ bignum.h: In function ‘const CBigNum operator(const CBigNum&, const CBigNum&)’: bignum.h:735:33: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_mul(BIGNUM, const BIGNUM, const BIGNUM, BN_CTX)’ if (!BN_mul(&r, &a, &b, pctx)) ^ bignum.h: In function ‘const CBigNum operator/(const CBigNum&, const CBigNum&)’: bignum.h:744:39: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_div(BIGNUM, BIGNUM, const BIGNUM, const BIGNUM, BN_CTX)’ if (!BN_div(&r, NULL, &a, &b, pctx)) ^ bignum.h: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’: bignum.h:753:35: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_nnmod(BIGNUM, const BIGNUM, const BIGNUM, BN_CTX)’ if (!BN_nnmod(&r, &a, &b, pctx)) ^ bignum.h: In function ‘const CBigNum operator<<(const CBigNum&, unsigned int)’: bignum.h:761:33: error: cannot convert ‘CBigNum’ to ‘BIGNUM {aka bignum_st}’ for argument ‘1’ to ‘int BN_lshift(BIGNUM, const BIGNUM, int)’ if (!BN_lshift(&r, &a, shift)) ^ bignum.h: In function ‘bool operator==(const CBigNum&, const CBigNum&)’: bignum.h:773:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ inline bool operator==(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) == 0); } ^ bignum.h: In function ‘bool operator!=(const CBigNum&, const CBigNum&)’: bignum.h:774:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ inline bool operator!=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) != 0); } ^ bignum.h: In function ‘bool operator<=(const CBigNum&, const CBigNum&)’: bignum.h:775:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ inline bool operator<=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) <= 0); } ^ bignum.h: In function ‘bool operator>=(const CBigNum&, const CBigNum&)’: bignum.h:776:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ inline bool operator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) >= 0); } ^ bignum.h: In function ‘bool operator<(const CBigNum&, const CBigNum&)’: bignum.h:777:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM)’ inline bool operator<(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) < 0); } ^ bignum.h: In function ‘bool operator>(const CBigNum&, const CBigNum&)’: bignum.h:778:83: error: cannot convert ‘const CBigNum’ to ‘const BIGNUM {aka const bignum_st}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM, const BIGNUM*)’ inline bool operator>(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) > 0); } ^ makefile.unix:208: recipe for target 'obj/alert.o' failed make: *** [obj/alert.o] Error 1

tofutim commented 2 years ago

This error comes from a newer version of db than db 4.8.30.

CryptoManiac commented 2 years ago

Fixed