Skip to content

Unable to Compile? #5

@martindale

Description

@martindale

Despite linking the latest secp256k1, I'm unable to compile this as-is?

$   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

Seems like this needs to be pushed upstream or a target version specified?

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