Error <mutex> is not supported when compiling with /clr or /clr:pure

让人想犯罪 __ 提交于 2019-12-07 07:25:39

问题


I have a C++ dll which I will call Dll A where I have used:

#include <mutex>

Dll As properties are set to "No Common Language Runtime Support" and it builds successfully.

I have another Dll B which includes DLL A in its references. Dll Bs properties are set to: "Common Language Runtime Support (/clr)" as it includes C++/CLI code.

When I build DLL B I get the error: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\mutex(8): fatal error C1189: #error : <mutex> is not supported when compiling with /clr or /clr:pure.

I know that I cannot include in a CLR supported DLL but is there a way I can get around this problem of referencing a dll that does include it?

来源:https://stackoverflow.com/questions/26585714/error-mutex-is-not-supported-when-compiling-with-clr-or-clrpure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!