Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

Problem referencing Managed class from the Unmanaged one

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sasha Nikolic - 25 Nov 2004 16:17 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.