Adding pthread
mspiropali opened this issue · comments
Mertiko Spiropali commented
I have a hard time adding pthread. I add -pthread to COMPILE_FLAGS, as well as -lpthread to LD_FLAGS, but the thread functions aren't recognised.
Michael Crawford commented
Sorry for the delay answering, I assume you probably found your answer long ago. For the sake of anyone else stumbling across this question, all that's needed to link against a library is is to add it to LINK_FLAGS
in the Makefile. In this case you'd set LINK_FLAGS = -lpthread
.