Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

visual studio 2008 - VC2008, how to turn CLR flag off for individual files in C++/CLI project

This post says that it is possible to turn off the CLR flag for an individual .cpp file.

From the post: You can set /CLR on or off in each .cpp file individually. Turn it on for the whole project,. as you have done, then turn it off for the files containing only native (unmanaged) code. When you have the VC++ procject properties dialog open, you can still click on files/projects in the solution explorer to change the scope that you're working on. Click on the unmanaged .cpp file to set options for just that file.

Is this true? I can't figure out how to do it through the property pages for my C++/CLI project. How would I accomplish this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just right click on a file in Solution Explorer and hit Properties. The option is "Compile with Common Language Runtime Support", under C/C++ -> General.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...