How can I mix the Concurrency Runtime with .NET code?

前端 未结 5 1311
旧时难觅i
旧时难觅i 2021-01-06 04:14

I\'ve been using the Concurrency Runtime in a C++ static library, and recently wanted to use this library in a C++/CLI project, to take advantage of the Windows Form designe

5条回答
  •  时光说笑
    2021-01-06 04:44

    I faced the same issue while while linking C++ to C# using CLR. This issue was caused while directly referencing the below items in the header file(*.h) which was included in CLR project.

    #include 
    using namespace concurrency;
    

    Since CLR does not support concurrency this gives error in the CLR project build. Moving this two lines to the corresponding *.cpp file solved the issue.

提交回复
热议问题