kkamegawa's weblog

Visual Studio,TFS,ALM,VSTS,DevOps関係のことについていろいろと書いていきます。Google Analyticsで解析を行っています

Concurrency Runtimeでのヘッダファイル

Concurrency Runtimeを使う場合、以下のヘッダファイルおよび名前空間の宣言が必要になります。

#include <ppl.h>

using namespace Concurrency;

ppl.hの中で、concrt.hを参照していますが、これを見ると

#if !(defined(_M_AMD64) || defined(_M_IX86))
    #error ERROR: Concurrency Runtime is supported only on X64 and X86 architectures.
#endif

#if defined(_M_CEE)
    #error ERROR: Concurrency Runtime is not supported when compiling /clr.
#endif

とか定義されているので、IA-64では(つまりX86AMD64以外では)こんなエラーが出ます。ついでに/clrもだめってことですね。

error C1189: #error : ERROR: Concurrency Runtime is supported only on X64 and X86 architectures.

ライブラリリファレンスもありがたいけれど、C/C++の場合はヘッダが語ってくれることもあるので、見ても全く損にはなりません。