我试过了:
1)POSIX Threads for Win32,myfiles1
我所做的是将“lib”和“include”文件夹中的文件从“Pre-built.2”目录复制到我的项目目录,并将此行添加到mapping.cpp
#pragma comment(lib, "pthreadVC2.lib")
但我无法弄清楚如何改变这一部分:
#if defined(LINUX)
pthread_t thread_print;
int iret_print;
iret_print = pthread_create( &thread_print, NULL, glRender, (void*) &globalOG);
#elif defined(WINDOWS)
HANDLE thread_id;
CreateThread(
NULL, // default security attributes
0, // use default stack size
glRender, // thread function name
NULL, // argument to thread function
0, // use default creation flags
&thread_id); // returns the thread identifier
#endif
我可能在Win实现方面做错了
#elif defined(WINDOWS)
DWORD WINAPI glRender( void *ptr )