有没有办法在旧的C / C ++编译器中使用C ++ 11线程对象 [英] Is there way to use C++ 11 thread objects within Older C/C++ Compiler

查看:94
本文介绍了有没有办法在旧的C / C ++编译器中使用C ++ 11线程对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用VS2013(Platformtoolset v120)和英特尔C ++编译器14(最新版本)构建C ++ 11 Thread类的包装类,并将其构建为dll,我的目的是使用各自的库和dll VS2010(Platfromtoolset v100),我的纯粹意图是以某种方式使用VS2010 builds的线程对象。最初我猜这是无法实现的,但有没有任何方法可以实现它?请帮助谢谢。

I tried to construct a wrapper class for C++11 Thread class using VS2013(Platformtoolset v120)and Intel C++ Compiler 14(lastest build) and built it as a dll,and my purpose was to use respective libs and dlls with VS2010(Platfromtoolset v100),my pure intention was to somehow use thread object with VS2010 builds.Initially I guessed this cannot be achieved,but Is there any methodology accomplish it? Please help Thank you.

推荐答案

如果不涉及C ++ 11项目,可能不会。您将不得不处理特定的OS API或某些跨平台的抽象层,例如boost库的: http://www.boost.org/doc/libs/1_38_0/doc/html/thread.html [ ^ ]。



-SA
If no C++11 projects are involved, probably not. You will have to deal with with the particular OS APIs or with some cross-platform abstraction layers, such as the of of the boost library: http://www.boost.org/doc/libs/1_38_0/doc/html/thread.html[^].

—SA


这篇关于有没有办法在旧的C / C ++编译器中使用C ++ 11线程对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆