关于Windows XP SP2 x86上不支持的两个C++11
来源:互联网 发布:mysql主键自增长 重置 编辑:程序博客网 时间:2024/06/07 01:03
这个年代了还有人用Windows XP SP2 x86,我也是醉了。。。
这个bug估计很少有人遇到吧。
std::mutex和std::thread不支持在Windows XP SP2 x86上运行,会报入下图的错误GetLogicalProcessorInformation找不到:
我是在visula studio 2015上面选择Visual Studio 2015 - Windows XP (v140_xp)这种模式和运行库选择:多线程 (/MT) 的时候遇到的。
去掉std::mutex和std::thread以后,就可以在Windows XP SP2 x86上运行了。
c++ lamada表达式貌似可以随便使用。
看了微软的2015 c++for xp的介绍:
https://msdn.microsoft.com/en-us/library/jj851139.aspx
C++ runtime support
Along with the Windows XP platform toolset, the C Runtime Library (CRT), Standard Template Library (STL), Active Template Library (ATL), Concurrency Runtime Library (ConCRT), Parallel Patterns Library (PPL), Microsoft Foundation Class Library (MFC), and C++ AMP (C++ Accelerated Massive Programming) library include runtime support for Windows XP and Windows Server 2003. For these operating systems, the minimum supported versions are Windows XP Service Pack 3 (SP3) for x86, Windows XP Service Pack 2 (SP2) for x64, and Windows Server 2003 Service Pack 2 (SP2) for both x86 and x64.
估计std::mutex和std::thread最低需要Windows XP Service Pack 2 (SP2) for x64。没找到x64的虚拟机。。。另外还有一个奇葩的函数:_stat
struct _stat fileStat;int result = _stat(directoryPath.c_str(), &fileStat);return (result == 0) && (fileStat.st_mode & _S_IFDIR);上面这个return 在某些情况下在Windows XP SP2上面和在Visula Studio 2013编译出来的某些情况下会返回失败,但是目录命名存在。
本人对这个函数理解不是很深刻。猜测可能是目录下面有文件(非文件夹)的原因。
- 关于Windows XP SP2 x86上不支持的两个C++11
- ArcGIS 9.0 在Windows XP SP2 上安装的问题
- Microsoft Windows XP SP2 中关于浏览安全性的变更
- DEP:关于Windows XP SP2中的安全性能的提高
- 关于 Windows XP SP2 对 raw socket 的影响
- Windows XP SP2的设置
- Windows xp sp2上安装iis出错
- 在 WINDOWS SERVER 2008 X86 SP2 上安装C++BUILDER 6 SP4
- 在 WINDOWS SERVER 2008 X86 SP2 上安装C++BUILDER 6 SP4
- xp sp2上rose2003的安装问题
- 激活您的Windows XP SP2
- DIY自己的windows xp SP2安装盘.
- Windows XP SP2防火墙的设置
- Windows XP SP2防火墙的设置
- 解决Windows XP SP2带来的网络故障
- Windows XP SP2 多用户登录的方法
- windows xp Sp2下ns2的安装
- 关于windows xp sp2和windows 2003 sp1的最大连接数限制分析
- JSTL之<c:forEach>
- 将汉字转化成Unicode编码
- 【Java8】Guava——Predicate
- 在Ubuntu下使用autotools生成Makefile
- eclipse中使用jstl
- 关于Windows XP SP2 x86上不支持的两个C++11
- jdbc获取表中列名
- 网狐【客户端配置杂项】
- sql语句
- 迷宫
- Linux 的gcc gdb
- jQuery插件linkButton
- spring之PropertyPlaceholderConfigurer类
- Velocity 邮件模板在Spring 中发邮件报unable to find resource 'test.vm' in any resou的原因