<future> is not supported when compiling with /clr or /clr:pure
-
Hello.
I’m trying to use in my Qt project some C# dll, like in this guide:
http://pragmateek.com/using-c-from-native-c-with-the-help-of-ccli-v2/ .
I have no problems with native C++ application. But when I’m trying do the same in test Qt console application I have this compilation error:
error C1190: managed targeted code requires a '/clr' option.
Ok, for test Qt project I can add this option and it work correctly. But when compile my own application with /clr option I have one more compilation error:
error C1189: <future> is not supported when compiling with /clr or /clr:pure.
Why does Qt application requires /clr option and simple C++ app doesn’t? Can I overcome this requirement some way? -
Hello.
I’m trying to use in my Qt project some C# dll, like in this guide:
http://pragmateek.com/using-c-from-native-c-with-the-help-of-ccli-v2/ .
I have no problems with native C++ application. But when I’m trying do the same in test Qt console application I have this compilation error:
error C1190: managed targeted code requires a '/clr' option.
Ok, for test Qt project I can add this option and it work correctly. But when compile my own application with /clr option I have one more compilation error:
error C1189: <future> is not supported when compiling with /clr or /clr:pure.
Why does Qt application requires /clr option and simple C++ app doesn’t? Can I overcome this requirement some way? -
In visual studio you can set single .cpp files to be compiled with /clr rather than the entire project. This allows you to avoid conflicts.
Any cpp file that #includes directly or indirectly <QThread> need to be compiled without the clr flagThis post is deleted!