Update: Looks like I am not doing anything wrong here. When I execute a thread example, it works fine. I am not sure, then why am I getting those errors when I start Apache.
copy "pthreadVC2.dll" file to "windows/system32" directory.then restart apache. It worked for me.