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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…