|
-
June 10th, 2002, 09:18 AM
#1
/clr
Does anyone know how I can set this option in .NET as I'm trying to compile unmanaged code and its not allowing me since I have to set the /CLR option.
Does anyone know?
regards
John
-
June 10th, 2002, 04:05 PM
#2
Did you try "/clr (Common Language Runtime Compilation)" from MSDN (Compiler Options Listed Alphabetically)?
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
June 13th, 2002, 03:53 AM
#3
/clr
From the solutions explorer right click on the project which you want to add the /clr option to and select properties. Under the c++ folder in the properties dialog select command line.
In the additional options box type "/clr".
You may have to change a couple of the other compile options as some of the defaults are not compatible with the /clr option.
-
June 13th, 2002, 04:00 AM
#4
Thanks for your reply. another question. If I port my old VC++ code over to .Net with that option does my unmanaged code become mangaed?
Can I use the .Net environment in the same way that I use VC++ 6 without fear that it's going to change my code?
Regards
John
-
June 14th, 2002, 04:27 AM
#5
/clr
When you port your project your existing classes do not become managed. To make existing classes managed you have to use the __gc keyword in the class header file, for example:
__gc class MyClass
{
public MyClass();
etc...
}
As far as using VC7, I am sure that your code will not be changed but you may need to change it. I had to give up porting a large MFC app as there were so many compile error regarding Message maps, strings and fstreams. However, i write all my new stuff using VC7 and find it very good.
Good luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|