Skip to content

cannot convert ‘unsigned char*’ to ‘secp256k1_pubkey_t*’ #40

@c-christie

Description

@c-christie

I was following along with alpha-README.md and made it to make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static" of the To move money into Elements Alpha section. Here's the output:

$ make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static"
g++ -O2 -Wall -I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static -I. contracthashtool.c stolen.cpp uint256.cpp crypto/ripemd160.cpp crypto/sha2.cpp -o contracthashtool -lsecp256k1
contracthashtool.c: In function ‘int main(int, char**)’:
contracthashtool.c:246:75: error: cannot convert ‘unsigned char*’ to ‘secp256k1_pubkey_t*’ for argument ‘2’ to ‘int secp256k1_ec_pubkey_tweak_add(const secp256k1_context_t*, secp256k1_pubkey_t*, const unsigned char*)’
     if (secp256k1_ec_pubkey_tweak_add(secp256k1_ctx, keys_work[i], 33, res) == 0) {
                                                                           ^
contracthashtool.c:290:67: error: cannot convert ‘unsigned char*’ to ‘secp256k1_pubkey_t*’ for argument ‘2’ to ‘int secp256k1_ec_pubkey_create(const secp256k1_context_t*, secp256k1_pubkey_t*, const unsigned char*)’
   if (secp256k1_ec_pubkey_create(secp256k1_ctx, pub, &len, priv, 1) != 1 || len != 33)
                                                                   ^
make: *** [all] Error 1

If there's anything that I can do to help, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions