Hi, I tried to construct a simple program to generate an uuid.
Code:
#include <stdio.h>
#include <uuid/uuid.h>
int main()
{
get_uuid();
return 1;
}
int get_uuid()
{
uuid_t uuid;
uuid_generate(uuid);
return 1;
}
But it gives the following compilation error.
lsf@lsf-laptop:~/mesh_project/cexample$ gcc -o uuid_test uuid_test.c
/tmp/ccCgFyZU.o: In function `get_uuid':
uuid_test.c.text+0x3c): undefined reference to `uuid_generate'
collect2: ld returned 1 exit status
what goes wrong with my code? appreciate you every advice.
nuwan