WINDOWS下编译SDL2,出错如下:
SDL2-2.0.14/include/SDL_thread.h:107:25: error: '_beginthreadex' undeclared (first use in this function); did you mean 'SDL_beginthread'?
#define SDL_beginthread _beginthreadex
这个错误是怎么产生的?在cygwin中编译用到SDL2的代码。怎么解决呢?
- 修改SDL_thread.h。越改越多。
- 使用VS编译。太麻烦。
- 使用Linux版本的头文件。一下子就过去了。