none
Visual Studio 2010 - Switch to Release Mode - How?

    Question

  • Hello,

    I'm trying to work on a Plug In from Adobe After Effects SDK.

    I'm using Windows 7 64 Bit and Visual Studio 2010.

    I took a sample code and rewrote the code according to my algorithm.

    The problem is the Sample is given in "Debug Mode".

    The option for release mode in the Configuration drop down list does not exists.

    I'm trying to apply some optimizations in my compiler yet they work in Release Mode only.

    Is there a way to enforce / switch to Release Mode configuration?

    I've tried everything with no success.
    The other users in Adobe forum told me setting the switch to /MT instead of /MTd is enought, yet it is not.

    I'd be happy to understand how to switch modes and what it means for the compiler.

    Thank You.

    Tuesday, September 25, 2012 9:17 AM

Answers

  • As you wrote, the samples come with project files which do not contain the "Release" configuration.

    It is like Davail already said, it is not difficuilt. Most debug stuff is disabled using /MD or /MT setting for the compiler.

    I'd be happy to know which settings should I change to make the compiler compile in release mode and apply optimizations.

    In general you can do optimizing setting in the project properties in "C/C++ - Optimization" tree. You can decide in what way you want to optimize (speed , Code size....) You also disable the "Generate Debug Info" in the project properties "Linker - Debugging" tree. At all it is not so complicated to disable the debug stuff. It is clearly named. just check out all settings in "C/C++" and "Linker" tree of your project properties.

    Moreover, how can I have indication in which mode the compiler is working?

    You see this in your settings you made if your debug stuff is on or off. It is surely recommended that you name your "release" configuration in a way that you know it is a release configuration with no debug info.

    At all my debug configurations are all named "Debug xxxx" (xxxx may be special stuff i.e. if I link statically or with some special test code or whatever). All my release configuration without debug information are named "Release xxxx" (xxxx may also describe special stuff).


    Wednesday, September 26, 2012 8:05 AM

All replies

  • Hello,

    I'm trying to work on a Plug In from Adobe After Effects SDK.

    I'm using Windows 7 64 Bit and Visual Studio 2010.

    I took a sample code and rewrote the code according to my algorithm.

    The problem is the Sample is given in "Debug Mode".

    The option for release mode in the Configuration drop down list does not exists.

    I'm trying to apply some optimizations in my compiler yet they work in Release Mode only.

    Is there a way to enforce / switch to Release Mode configuration?

    I've tried everything with no success.
    The other users in Adobe forum told me setting the switch to /MT instead of /MTd is enought, yet it is not.

    I'd be happy to understand how to switch modes and what it means for the compiler.

    Thank You.

    Tuesday, September 25, 2012 8:04 AM
  • I'd recommend creating a new configuration. If you open the Dropidown of the "Debug" configuration, you will find an additional item named "Configuration manager". Select this and a windows will open. On this window you also select the option "new" and you should create a new configuration based on your debug configuration. You give this configuration a name you like and in this configuration you can change the compiler / linker settings in the project properties.

    In general if you use /MT instead of /MTd the IDE uses the release versions of the runtime library instead of the debug library. But at least if you use /MT you are not able to watch variables during debugging since the debug infos are missing.

    Tuesday, September 25, 2012 9:02 AM
  • Hello,
     
    I'm trying to work on a Plug In from Adobe After Effects SDK.
     
    I'm using Windows 7 64 Bit and Visual Studio 2010.
     
    I took a sample code and rewrote the code according to my algorithm.
     
    The problem is the Sample is given in "Debug Mode".
     
    The option for release mode in the Configuration drop down list does not exists.
     
    I'm trying to apply some optimizations in my compiler yet they work in Release Mode only.
     
    Is there a way to enforce / switch to Release Mode configuration?
     
    I've tried everything with no success.
    The other users in Adobe forum told me setting the switch to /MT instead of /MTd is enought, yet it is not.
    Did your project files (.sln, .vcxproj) come with the sample, or did you create them yourself?
     
    In any case, would it be possible for you to create a new project and add your files to it?
     
    When you create a new project, it comes with Debug and Release configurations. They differ in the CRT version used (/MD or /MT for Release, /MDd or /MTd for Debug) and the optimization settings (active for Release, disabled for Debug), and various macros. I'm sure it is possible to create a Release configuration by copying the Debug version and changing the settings, but I think you might find it easier to start with a fresh project.
     

    David Wilkinson | Visual C++ MVP
    Tuesday, September 25, 2012 10:26 AM
  • Hello,
     
    I'm trying to work on a Plug In from Adobe After Effects SDK.
     
    I'm using Windows 7 64 Bit and Visual Studio 2010.
     
    I took a sample code and rewrote the code according to my algorithm.
     
    The problem is the Sample is given in "Debug Mode".
     
    The option for release mode in the Configuration drop down list does not exists.
    Please don't multipost. You have posted the same question in vcgeneral.
     

    David Wilkinson | Visual C++ MVP
    Tuesday, September 25, 2012 10:29 AM
  • Hi David,

    As you wrote, the samples come with project files which do not contain the "Release" configuration.

    I'd be happy to know which settings should I change to make the compiler compile in release mode and apply optimizations.

    Moreover, how can I have indication in which mode the compiler is working?

    Thank You.

    Wednesday, September 26, 2012 7:42 AM
  • As you wrote, the samples come with project files which do not contain the "Release" configuration.

    It is like Davail already said, it is not difficuilt. Most debug stuff is disabled using /MD or /MT setting for the compiler.

    I'd be happy to know which settings should I change to make the compiler compile in release mode and apply optimizations.

    In general you can do optimizing setting in the project properties in "C/C++ - Optimization" tree. You can decide in what way you want to optimize (speed , Code size....) You also disable the "Generate Debug Info" in the project properties "Linker - Debugging" tree. At all it is not so complicated to disable the debug stuff. It is clearly named. just check out all settings in "C/C++" and "Linker" tree of your project properties.

    Moreover, how can I have indication in which mode the compiler is working?

    You see this in your settings you made if your debug stuff is on or off. It is surely recommended that you name your "release" configuration in a way that you know it is a release configuration with no debug info.

    At all my debug configurations are all named "Debug xxxx" (xxxx may be special stuff i.e. if I link statically or with some special test code or whatever). All my release configuration without debug information are named "Release xxxx" (xxxx may also describe special stuff).


    Wednesday, September 26, 2012 8:05 AM
  • Hi,

    I have marked Bordon's reply as answer.
    If you disagree, please unmark it, and post your doubt.

    Regards,


    Elegentin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, October 02, 2012 8:18 AM
  • Hello,

    I will merge this thread to this one: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/bf2f1eff-e5df-4c4f-b5b5-b5d377cd3158

    You have multiposted a same question.

    Thanks,


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

    Friday, October 05, 2012 6:59 AM