when i'm using eclipse to build an application that is using threads, i have to attach the library pthread in order that the
#include <pthread.h> will resolved.
Nope, you don't need anything extra to add to use pthread aside from the include and the lib. Try changing the “hello world” to thread example and it should compile just fine. I have used the lib without any issues on minimal ltib build.