1)创建一个编lib库的vc工程,把pthread.c加入工程
2)把dll.c中的DllMain函数注释掉
3)编译出pthread.lib
4)
#include "pthread.h"
#pragma comment(lib, "pthread.lib")
5)
#define PTW32_STATIC_LIB
int main()
{
#ifdef PTW32_STATIC_LIB
pthread_win32_process_attach_np();
#endif
/*use ffmpeg api do decode*/
.....................
#ifdef PTW32_STATIC_LIB
pthread_win32_process_detach_np();
#endif
}