alexbav / corsl Goto Github PK
View Code? Open in Web Editor NEWCoroutine Support Library
License: Other
Coroutine Support Library
License: Other
Hi
I have been getting familiar with this great library playing with the sample project you kindly provided.
Now i want to utilize Corsl API in my project.
Previously had issue cause my project was set to v140 ms toolchain instead of v141
This resolved the problem of promise not appearing in corsl namespace.
However on building the code promise variable declaration builds fine but future variable declaration fails.
Currently only in corsl sample can i build future and promise ok, not in my project , but also the code snippet below is from unmodified ms cppwinrt sample called Blocks.
I am trying to get corsl future to build on a project that support x86/x64/ and ARM. The corsl sample project only supports x86/x64 builds, else i would have used it as my template and move. Dont mind tip if its convertible to support ARM.
So as per the title of this post , i have turned my attention to get corsl to build with almost any MS cpp-WinRt sample that supports x86/x64/ARM example Blocks, and its failing on future.
Currently MS does not provide a template project for Cpp-WinRt so i have to choose from there samples to clone as base for my project, tried your sample as clone for my base but ARM build not supported.
Thanks
//Main of Microsoft cpp-winrt blocks sample i insert corsl test code
#include <corsl/all.h>
int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
{
corsl::future<int> refresh_task; //complier error
corsl::promise<int> prom; //builds ok
CoreApplication::Run(App());
}
Error Output { undeclared variable use_count'} Line 153 future.h
1>------ Rebuild All started: Project: LibTestApp, Configuration: Debug x64 ------
1> 1 file(s) copied.
1>pch.cpp
1>App.cpp
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(153): error C2065: 'use_count': undeclared identifier
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(152): note: while compiling class template member function 'void corsl::details::promise_type_<T>::release(void) noexcept'
1> with
1> [
1> T=int
1> ]
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(236): note: see reference to function template instantiation 'void corsl::details::promise_type_<T>::release(void) noexcept' being compiled
1> with
1> [
1> T=int
1> ]
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(236): note: see reference to class template instantiation 'corsl::details::promise_type_<T>' being compiled
1> with
1> [
1> T=int
1> ]
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(234): note: while compiling class template member function 'corsl::details::future<int>::~future(void)'
1>d:\development\projects\test projects\cppwinrt\corsl_blocks\app.cpp(150): note: see reference to function template instantiation 'corsl::details::future<int>::~future(void)' being compiled
1>d:\development\projects\test projects\cppwinrt\corsl_blocks\app.cpp(150): note: see reference to class template instantiation 'corsl::details::future<int>' being compiled
1>d:\development\projects\test projects\cppwinrt\corsl_blocks\packages\cppwinrt.2017.4.6.1\build\native\include\winrt\base.h(4800): note: see reference to class template instantiation 'winrt::Windows::Foundation::Collections::impl_IIterator<winrt::Windows::Foundation::Collections::IIterator<T>,T>' being compiled
1> with
1> [
1> T=winrt::Windows::UI::Composition::Visual
1> ]
1>d:\development\projects\test projects\cppwinrt\corsl_blocks\app.cpp(66): note: see reference to class template instantiation 'winrt::Windows::Foundation::Collections::IIterator<T>' being compiled
1> with
1> [
1> T=winrt::Windows::UI::Composition::Visual
1> ]
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(153): error C2228: left of '.fetch_sub' must have class/struct/union
1>d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\future.h(153): note: type is 'unknown-type'
1>Done building project "LibTestApp.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Hi
Thank you very much for helping with this lib
I have taken a zip of Corsl, extracted, updated winrt nugget package and sample will not build.
Also tried referencing corsl in my current project but corsl::promise is not showing up in corsl name space, even though corsl::future is present.
I am using vs2015, so had to convert build type from version 141 to 140. v2017 too buggy for me currently.
Again the sample does not build for me out of the box, and i only had to update winrt nugget cause that was first thing it complained about .
Thanks Much in advance
some of the error output
[1]
Severity Code Description Project File Line Suppression State
Error C2975 '_Test': invalid template argument for 'std::enable_if_t', expected compile-time constant expression sample1 d:\development\projects\libs\corsl\corsl-master\corsl-master\include\corsl\promise.h 27
[2]
Severity Code Description Project File Line Suppression State
Error (active) namespace "corsl" has no member "promise" sample1 d:\Development\Projects\LIBS\Corsl\corsl-master\corsl-master\sample1\main.cpp 238
cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.