Topic: 'undefined reference'
Hi,
I have run into following error:
/tmp/ccrfx1RK.o: In function `main':
sha.c:(.text+0x3d): undefined reference to `wc_InitSha'
sha.c:(.text+0x58): undefined reference to `wc_ShaUpdate'
sha.c:(.text+0x6e): undefined reference to `wc_ShaFinal'
collect2: error: ld returned 1 exit status
The code I am trying to compile is as follows:
#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/sha.h>
int main()
{
int ret = 0;
char hash[20];
char string[8] = "Test sha";
Sha sha[1];
wc_InitSha(sha);
wc_ShaUpdate(sha, string, 8);
wc_ShaFinal(sha, hash);
}
I have installed wolfSSL per instruction for Linux and the tests ran fine.
I would appreciate any help to get over this blocker.