RSS

Tag Archives: /clr /GL Visual Studio Project setting

Using /clr and incompatibility troubleshooting in MFC applications


In some circumstances, to use C# Winform or other .Net objects in MFC applications, the “/clr” directive should be used in the MFC project settings. However, it is found not always possible to use “/clr” to avoid conflicts with other projects in the same solution.

The workaround is to apply “/clr” on a specific cpp file, rather than on the entire project!

clip_image002

Read the rest of this entry »

 
Leave a comment

Posted by on April 16, 2011 in Dotnet/C#, MFC

 

Tags:

How to manually setup/modify Visual C++ Project settings such as /GL, /Yu etc. in VisualStudio.Net 2002


Most Visual C++ project settings can be setup using the Project Properties dialog, but not all. In my recent project, I am trying to host Windows Form in MFC (VS2002), and the directive “/clr” must be used.

Once “/clr” is used, some other directives such “/GL” must be disabled to avoid incompatibilities. After searching MSDN, I have found that “/GL” is related to “Whole Program Optimization”, but even after disabling the whole program optimization in Visual Studio 2002, it is stated that the “/GL” switch is still turned on. I have tried every setting, but have no way to disable this, and this is clearly shown in the final command line.

Read the rest of this entry »

 
Leave a comment

Posted by on April 16, 2011 in MFC

 

Tags: