znort987 / blockparser

Simple C++ bitcoin blockchain parser
539 stars 317 forks source link

error: ‘BN_CTX_init’ was not declared in this scope BN_CTX_init(ctx); #57

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi,

Thanks for the great work, i hope you can assist. After perl make i get the following:

util.cpp: In function ‘bool addrToHash160(uint8_t, const uint8_t, bool, bool)’: util.cpp:606:24: error: ‘BN_CTX_init’ was not declared in this scope BN_CTX_init(ctx); ^ util.cpp: In function ‘void hash160ToAddr(uint8_t, const uint8_t, bool, uint8_t)’: util.cpp:729:24: error: ‘BN_CTX_init’ was not declared in this scope BN_CTX_init(ctx); ^ c++ -- .r... -- option.cpp c++ -- .r... -- rmd160.cpp c++ -- .r... -- sha256.cpp c++ -- .r... -- opcodes.cpp c++ -- .r... -- callback.cpp c++ -- .r... -- t/sha256_t.cpp At global scope: cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’ c++ -- .r... -- t/secp256k1_t.cpp /tmp/GmlKr7pZ:387: recipe for target '.objs/d5cd7ce3e58ff7a8ebc2786c817cb6dcd1a22603.o' failed make: *** [.objs/d5cd7ce3e58ff7a8ebc2786c817cb6dcd1a22603.o] Error 1 c++ -- .r... -- t/ripemd-160_t.cpp c++ -- .r... -- t/base58_t.cpp c++ -- .r... -- tst.cpp c++ -- .r... -- test.cpp make: Target 'all' not remade because of errors.

I would be very great full if you can assist.

01BTC10 commented 7 years ago

It looks like it has been deprecated: https://www.openssl.org/docs/man1.0.2/crypto/BN_CTX_new.html

I think simply commenting out line 606 and 729 of util.cpp fix the issue.