For questions about code that compiles but does not link due to unresolved external symbols. It is important that questions include the full linker command as well as the minimal program that references the name in question.
"Unresolved external symbol" is a linker error. It often means that some function has a declaration, but not a definition.
A common cause of this error is compiling code against a library's headers, but failing to link with that library's code: missing the library from the link command, or picking up a different version of the library.
There is a FAQ: What is an undefined reference/unresolved external symbol error and how do I fix it?. If your question lacks the full linker command, and shows no evidence of having read those answers, do not be surprised if you are redirected there.
How to write a good question
Create the simplest reproducible program to demonstrate the issue. A simple way to do this in C is to take the address of the symbol and use it:
#include <pthread.h> int main() { int (*a)(pthread_t) = pthread_detach; return !a; }
Show the command used to link the program, and its output:
gcc -std=c11 -fPIC unresolved-external.c -o unresolved-external
/tmp/user/1432/ccI38tid.o: In function `main': unresolved-external.c:5: undefined reference to `pthread_detach' collect2: error: ld returned 1 exit status