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

16 Apr

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.

To troubleshoot this, one of the approach is to manually edit such settings.

  • Open *.vcproj use notepad.exe
  • Search “WholeProgramOptimization”
  • Change the value from “TRUE” to “FALSE”

That is it!

Note that such a setting can be interactively configured in Visual Studio 2010, as shown below.


Leave a comment

Posted by on April 16, 2011 in MFC



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: