Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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!!)
Copy link to clipboard
Copied
Hi Mike,
Could you please elaborate on the NDEBUG macro?
Thanks.
Copy link to clipboard
Copied
Project Properties -> Configuration Properties ->c/c++ -> Preprocessor -> Preprocessor Definitions, add NDEBUG
greets
Copy link to clipboard
Copied
I hope this will give us a "Release Configuration".
As the compiler optimizations are really needed.
Copy link to clipboard
Copied
Hi Mike,
Did that, with no success.
Any other idea?
How could that be so hard :-)?
Copy link to clipboard
Copied
what exactly is the message when it says "Debug Mode" ?
Copy link to clipboard
Copied
It just doesn't apply the optimizations of the compiler.
Copy link to clipboard
Copied
have you checked the C/C++ / Optimization in Project Properties?
Copy link to clipboard
Copied
Of Course.
They are all on.
It's something a bit deeper I guess.
Copy link to clipboard
Copied
how do you know it does not apply optimisations?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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...
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
perhaps you can post the compiler message here...?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.