-
Notifications
You must be signed in to change notification settings - Fork 260
Description
Hi there,
I'm currently trying to use the cppwinrt bindings in a project which I'm compiling with MinGW GCC.
First, I added the path to the cppwinrt headers from the Windows SDK to my include path (i.e. C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt
)
When I try to include some winrt header now, the compiler complaints about a missing header (i.e. <experimental/coroutine>
). From my research, this language feature is only available experimentally in C++17 and can be enabled in the clang complier using the -fcoroutines-ts
flag. (It is also available in MSVC, I thin there it is compiler flag /await
).
I was not able to find anything about this experimental support in GCC. However, MinGW supports GCC 10 which in turn supports C++20 and has support for coroutines. To enable this, we have to tell the compiler to use c++20 (i.e. -std=gnu++20
) and additionally set the compiler flag -fcoroutines
. As a result, the coroutine
header will be available.
As base.h
only includes <experimental/coroutine>
, I changed the include to #include <coroutine>
. When I tried to compile again, the compiler did no longer complain about a missing headers or a missing compiler flag. However, now I get a huge amount of compile errors which I have attached in a log file.
At this moment I'm pretty much clueless how to continue or if this is even possible using MinGW GCC. Any insights and help is much appreciated. Thanks!