I am using strlcpy and strlcat in place of strncat/cpy; however, whenever I go to compile it
GCC -o Project Project.c
it will continuously through me errors saying:
Undefined reference to strlcpy; Undefined reference to 'strlcat'
My code:
#include <bsd/string.h>
strlcpy(path, ARTICLEPATH, sizeof(ARTICLEPATH));
strlcat(path, ARTICLEPATH, sizeof(path));
I have added the library to my file, but it seems to continue to throw me the error:
#include <bsd/string.h>
Is there something else I need to do? Or is there an another alternative to using strncpy that utilizes null byte termination?
EDIT: As background, I am on ubuntu 20.04