在c ++上使用System :: Diagnostics :: Tracing :: EventSource时发出警告C4538

时间:2014-05-29 10:47:57

标签: c++-cli system.diagnostics semantic-logging

我正在尝试使用C ++为SLAB创建一个事件源类。我已经尝试使用C#创建一个,所以我对以下问题毫无头绪。

所以基本上我使用.Net中提供的System :: Diagnostic :: Tracing EventSource类。但是,当我扩展所述EventSource类时,会产生以下警告

warning C4538: 'cli::array<Type,dimension> ^': const/volatile qualifiers on this type are not supported
with
      [
          Type=System::Diagnostics::Tracing::EventSource::EventMetadata,
          dimension=1
      ]
This diagnostic occurred while importing type 'System::Diagnostics::Tracing::EventSource ' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.   

那么,为什么我只是在扩展课程时会出现此警告?如何删除它?

另外,有人可以告诉我一个用C ++创建SLAB EventSource的例子吗?我在网上搜索过但我找不到一个。

我真的是C ++的初学者,特别是使用托管C ++,所以如果这个问题看起来很愚蠢,我真的很抱歉。

0 个答案:

没有答案