I was checking out how to generate public keys from a private bitcoin address.
I found the following page:
How do I obtain the public key from an ECDSA private key in OpenSSL?
But when I try to compile with gcc -Wall -Werror -O3 -o public_key public_key.c -lcrypto
, I get the following errors:
public_key.c: In function 'generate_pubic_key':
public_key.c:26:13: error: storage size of 'start' isn't known
BIGNUM start;
^~~~~
public_key.c:32:6: error: implicit declaration of function 'BN_init' [-Werror=implicit-function-declaration]
BN_init(&start);
^~~~~~~
public_key.c:26:13: error: unused variable 'start' [-Werror=unused-variable]
BIGNUM start;
^~~~~
cc1: all warnings being treated as errors
I have OpenSSL installed and haven't had any programing errors related to it, until now. Can someone point out what it is that I'm doing wrong?