Sign in to follow this  

/clr with managed code in win32

This topic is 4801 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a win32 project, it includes mscorlib.dll. WHen I enter a line of managed code it says managed code requires mscorlib.dll and the /clr option. How do I add the /clr option, where does it go? I am using c++ and microsft visual studio .net 2003

Share this post


Link to post
Share on other sites
Go to your project's properties. On the General page there should be a line "Use Managed Extensions" two up from the bottom. Change that guy to yes to enable the /clr switch for your project.

Share this post


Link to post
Share on other sites
cheers, that stopped the error.

but now, i have the code

...
using namespace System;
...
...

Diagnostics::Process *p[1];
...


I know this works in a console project but i get Process is not a member of System::Diagnostics.

when i type the '::' in the win32 project it brings up about 6 options, however in the console i get about 100.

I have checked libraries. but they both use the same. This is quite annoying, does anyone have any ideas.

Share this post


Link to post
Share on other sites
Sign in to follow this