I have defined a managed class ( __gc ) and a unmanaged ( __nogc ) in a
separate files (but in the same vc++ dotnet project). I have no problem of
referencing the unmanaged class from the menaged one. My problem is that I
cannot reference managed class from the unmanaged.
In my unmanaged class, if I use "using namespace ManagedNamespace;" I get
error C2871: a namespace with this name does not exist. I get the simmilar
error when trying to reference the Managed class directly from the unmanaged
class methods.
If i use "#include ".\ManagedClass.h" I get syntax errors in that header
file (and it was compiling OK before referencing it from the unmanaged
class).
When I copy the unmanaged class to the same file where the managed is,
everything seems ok. Unfortunately, I must keep them separate.
Can anybody help?
Thanks,
Sasha
Ronald Laeremans [MSFT] - 30 Nov 2004 01:19 GMT
A small repro case would be the fastest way to get a concrete solution to
this.
Thanks.
Ronald Laeremans
Visual C++ team
>I have defined a managed class ( __gc ) and a unmanaged ( __nogc ) in a
> separate files (but in the same vc++ dotnet project). I have no problem of
[quoted text clipped - 18 lines]
> Thanks,
> Sasha