Sign in to follow this  
crazy_andy

/clr with managed code in win32

Recommended Posts

crazy_andy    100
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
SiCrane    11839
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
crazy_andy    100
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this