hi, I need to use a thread in an own package I'm doing.
I've got something like that
#include<pthread.h>
void *hahaha(void *vargp)
{
printf("hohoho\n");
return NULL;
}
int main(int argc,char **argv)
{
pthread_t tid;
pthread_create(&tid, NULL, hahaha, NULL);
pthread_join(tid, NULL);
return 0;
}
I also put the flag -pthread in the makefile and it compiles successfully, b
my_package: $(OBJDIR)my_package.o $(OBJDIR)list.o
$(CXX) $(OBJDIR)my_package.o -lpthread $(OBJDIR)list.o -o $@ $(LDFLAGS) -lpcap
ut when executing it, the next error appears:
can't load library 'libpthread.so.0'
any idea?