cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

Unable to build under MSVC preview.

Open nanoric opened this issue 3 years ago • 3 comments

cl version: 19.28.29617 Visual Studio version: 16.9.0 preview error:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.28.29617\include\experimental/coroutine(37): fatal error C1189: #error:  The <experimental/coroutine> and <experimental/resumable> headers are only supported with /await and implement pre-C++20 coroutine support. Use <coroutine> for standard C++20 coroutines.

<experimental/coroutine> is not supported in preview version. consider use under msvc. maybe __has_include is a good choice to dertemin which file to include.

nanoric avatar Dec 28 '20 09:12 nanoric

It seems that VS2019 (without preview, 16.8.3 is unable to build cppcoro too for now.) I remember that older version of cppcoro has a header <cppcoro/coutines.h> that works fine with both versions.

nanoric avatar Dec 28 '20 09:12 nanoric

In the fork https://github.com/andreasbuhr/cppcoro I made some modifications to make it work.

andreasbuhr avatar Dec 28 '20 09:12 andreasbuhr

In the fork https://github.com/andreasbuhr/cppcoro I made some modifications to make it work.

Thanks for responding so quickly, help me so much!

nanoric avatar Dec 28 '20 09:12 nanoric