the libbitcoin library seems to have been installed just fine. but the following code can't seem to include bitcoin/bitcoin.hpp
#include<bitcoin/bitcoin.hpp>
#include<iostream>
using namespace bc;
int main() {
block_type blk = genesis_block();
std::cout<<encode_hex(hash_block_header(blk.header))<<std::endl;
return 0;
}
Error:
g++ -o test test.cpp $(pkg-config --cflags --libs libbitcoin)
test.cpp: In function ‘int main()’:
test.cpp:5:5: error: ‘block_type’ was not declared in this scope
block_type blk = genesis_block();
^~~~~~~~~~
test.cpp:5:5: note: suggested alternative: ‘clock_t’
block_type blk = genesis_block();
^~~~~~~~~~
clock_t
test.cpp:6:45: error: ‘blk’ was not declared in this scope
std::cout<<encode_hex(hash_block_header(blk.header))<<std::endl;
^~~
test.cpp:6:45: note: suggested alternative: ‘brk’
std::cout<<encode_hex(hash_block_header(blk.header))<<std::endl;
^~~
brk
test.cpp:6:27: error: ‘hash_block_header’ was not declared in this scope
std::cout<<encode_hex(hash_block_header(blk.header))<<std::endl;
^~~~~~~~~~~~~~~~~
test.cpp:6:16: error: ‘encode_hex’ was not declared in this scope
std::cout<<encode_hex(hash_block_header(blk.header))<<std::endl;
^~~~~~~~~~