Topic: 'wc_ecc_get_generator' is not compiled and cannot be used
I downloaded and installed wolfssl-5.5.4 according to the document. I want to use the wc_ecc_get_generator() function in ecc.h. When compiling, I found undefined reference to 'wc_ecc_get_generator()'. I use command 'nm libwolfssl.so | grep wc_ecc_get_generator' in the /usr/local/lib ,found that there is no such function in the .so file.Some other functions in ecc.h can be used, but this function cannot, what is the solution? i just want to get the elliptic curve generator of ecc_point type.Is there any way to replace this function to achieve it?Thank you very much
#include <iostream>
#include <string>
#include <unistd.h>
#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/ecc.h>
#include <wolfssl/wolfcrypt/sp_int.h>
#include <wolfssl/wolfcrypt/integer.h>
#include <wolfssl/wolfcrypt/wolfmath.h>
using namespace std;
int main(){
ecc_key key;
WC_RNG rng;
wc_ecc_init(&key);
wc_InitRng(&rng);
int curveId = ECC_SECP521R1;
int keySize = wc_ecc_get_curve_size_from_id(curveId);
int ret = wc_ecc_make_key_ex(&rng, keySize, &key, curveId);
if (ret != MP_OKAY) {
// error handling
}
ecc_point point = key.pubkey;
ecc_point point1 ;
int err = 1;
err = wc_ecc_get_generator(&point1,curveId);
printf("%d\n",err);
err = 1;
err = wc_ecc_cmp_point(&point,&point1);
printf("%d\n",err);
return 0
}