Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Plug In Compilation - Switch to Release Mode - How?

Participant ,
Sep 25, 2012 Sep 25, 2012

Hello,

I'm writing an AE Plug In.

I'm using VS 2010 on Windows 7 64Bit.

I'm using some optimizations which requires compilation in "Release Mode".

Yet, all the Plug In samples in the SDK are given in "Debug Mode" only.

I'm aware of those threads:

http://forums.adobe.com/message/3568037#3568037

http://forums.adobe.com/message/2614866#2614866

I removed the "_DEBUG" flags and used the "/MT" flag as suggested.

Yet my compiler still says the compilation is done in "Debug Mode" hence no optimization is applied.

It's too bad, since in Photoshop SDK I have a release sample and there with the same algorithm I get up to x4 better performance.

Has anyone succeeded in switching into "Release Mode"?

I hope Adobe's people would give us the required information.

Thank You.

TOPICS
SDK
4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 25, 2012 Sep 25, 2012

You have to also set NDEBUG macro, among other optimisation flags; your best bet is to look at the Visual Studio documentation.

I would recommend creating a separate configuration for Release, as Debug is indeed handy for debugging (hence the name!!)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 25, 2012 Sep 25, 2012

Hi Mike,

Could you please elaborate on the NDEBUG macro?

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 25, 2012 Sep 25, 2012

Project Properties -> Configuration Properties ->c/c++ -> Preprocessor -> Preprocessor Definitions, add NDEBUG

greets

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 25, 2012 Sep 25, 2012

I hope this will give us a "Release Configuration".

As the compiler optimizations are really needed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 25, 2012 Sep 25, 2012

Hi Mike,

Did that, with no success.

Any other idea?

How could that be so hard :-)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 25, 2012 Sep 25, 2012

what exactly is the message when it says "Debug Mode" ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 25, 2012 Sep 25, 2012

It just doesn't apply the optimizations of the compiler.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 25, 2012 Sep 25, 2012

have you checked the C/C++ / Optimization in Project Properties?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 25, 2012 Sep 25, 2012

Of Course.

They are all on.

It's something a bit deeper I guess.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 26, 2012 Sep 26, 2012

how do you know it does not apply optimisations?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 26, 2012 Sep 26, 2012

By the speed and the report of the compiler.

It says, Debug Mode.

Is there any indication if the Compiler added the "Debug" data / Compiled in debug mode?

How can I create it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 26, 2012 Sep 26, 2012

sorry I am not aware of the "Debug mode".

Debug information does not have anything to do with a set of Visual Studio configurations, you ALSO use it to debug the Release builds.

For compiler optimisation you have to read documentation or copy settings fron a new project...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 26, 2012 Sep 26, 2012

Believe me, I know how to turn on the optimizations of my compiler.

I do this for many Photoshop Plug In's.

For some reason whatever setting I chose, the compiler says "Optmizations are turned off" because "debug" mode is applied.

Namely, something in the code or in the settings of the project given by Adobe enforce debug mode of compiling.

I just want to turn it off.

If you think you made it, could you share you project and solution of the Skeleton sample of the SDK?

Thank You.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 26, 2012 Sep 26, 2012

perhaps you can post the compiler message here...?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 26, 2012 Sep 26, 2012

Actually, I did not have any problems in turning the debug examples from the SDK (CS4, CS5, CS5.5 and CS6) to release mode in Visual Studio 2010.

Just changing the _DEBUG define to NDEBUG, adding /MD or /MT (works with both) and activating the optimisations in the project settings did the job for me, both for 32-bit and 64-bit compilations.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 27, 2012 Sep 27, 2012
LATEST

Hi Roya A,

I agree that the attribute in Configuration Properties > Code Generation > Runtime Library is the main item.  You may also want to create a new configuration named "Release" in the Configuration Manager, so that you can flip between Debug and Release as needed.

For the next SDK release, we are planning on providing release configurations.  I do not have a date on that, but it is something we are aware of to ease development.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines