我正在开发Windows 10通用应用程序,主要面向Windows手机。但是在尝试使用boost时,我会遇到像这样的错误:
boost/asio/detail/impl/win_thread.ipp(48): error C2039: 'TerminateThread': is not a member of '`global namespace''
据我所理解,此问题是由于boost使用win32 api而在Windows 10通用应用程序中不受支持所导致的。我尝试了当前官方版本的1.58和预发布版的1.59。我是否缺少任何标志?您是否有任何与boost和Windows通用应用程序支持相关的信息?
我创建了一个最小的程序来复现这个错误:
#include <boost/asio.hpp>
int main()
{
return 0;
}
实际上,我遇到的第一个错误是:
c:\program files (x86)\windows kits\10\include\10.0.10240.0\um\processthreadsapi.h(491): error C3861: 'FlsAlloc': identifier not found