title: Mixed C++ DLL Project with native and CLI code
body: <p>I've created C++ DLL project, this dll contains mostly native c++ code, but it have 1 mixed class written in C++ and using some .NET types.
  This class is declared in header file and have implementation in .cpp</p>
  
  <p>I can use it from all *.cpp files, but when i try to declare reference to C++/CLI class in some c++ header file i got tons of errors about project doesnt support CLR(CLR support in project settings as /clr is set up), it looks like header files doesnt support links to managed classes.</p>
  
  <p>This works from .CPP perfectly but fails with errors when used from .H</p>
  
  <pre><code>#include "NativeBitmap.h"
  using namespace Native;
  </code></pre>
  
  <p>NativeBitmap.H:</p>
  
  <pre><code>#pragma once
  namespace Native
  {
      using namespace System;
      using namespace System::Drawing;
      using namespace System::Collections::Generic;
      using namespace System::Runtime::InteropServices;
  
      public ref class NativeBitmap
      {
      }
  }
  </code></pre>
  
  <p>NativeBitmap.CPP:</p>
  
  <pre><code>#include "stdafx.h"
  #include "NativeBitmap.h"
  
  using Native::NativeBitmap;
  
  using namespace System;
  using namespace System::Drawing;
  using namespace System::Collections::Generic;
  using namespace System::Runtime::InteropServices;
  
  void NativeBitmap::Create(...)
  {
  ...
  }
  
  and so on ...
  </code></pre>