Log in

View Full Version : Updated Howto for Filter Development


merlinn31
24th July 2009, 02:12
Hi,

I tried following some of the Howtos on the Avisynth site, such as

http://avisynth.org/mediawiki/Filter_SDK/SDK_necessaries
http://avisynth.org/mediawiki/Filter_SDK/Ben_docs

Most of the tools that the necessaries references are not the newest versions, and I had a hard time locating some of them so I installed the newer ones instead. What I've ended up with are an installation of Visual C++ 2008 Express Edition and Microsoft Windows SDK 6.1. I'm not even sure if these tools will work for me.

I tried following Ben's howto (which was awesomely written) and managed to compile the invert.dll, but Avisynth complains that it's not a valid Avisynth 2.5 plugin.

I've tried compiling a few other filters such as EffectsMany and AudGraph and both fail horribly with lots of

error C2065: 'i' : undeclared identifier

and lots of warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data.

amongst a few other errors sprinkled in for color.

Is there an updated howto guide? Is this a misconfiguration with my setup?

Fizick
24th July 2009, 04:58
Thanks for your post.

1. Read notes to Bens docs:
http://avisynth.org/mediawiki/Filter_SDK/Ben_docs#Notes_to_Ben.27s_docs

Plugin exported function name is replaced from 'AvisynthPluginInit' for AviSynth 1.0-2.0 to 'AvisynthPluginInit2' for AviSynth 2.5.


2. Ignore any warnings.

3. Read http://avisynth.org/mediawiki/Filter_SDK/Compiling_instructions

4. Please try add new section "Compiling AviSynth Plugins step by step instructions (for MS VC++ 2008 Express Edition)" to the wiki :)

Gavino
24th July 2009, 09:35
I've tried compiling a few other filters such as EffectsMany and AudGraph and both fail horribly with lots of
"error C2065: 'i' : undeclared identifier"
This is likely due to a change in default behaviour introduced in the Visual C++ 2005 compiler to conform to standard C++ scope rules with 'for' loop variables. To remove the error, set compiler flag /Zc:forScope- or unset the "Force Conformance in For Loop Scope" language property. See
http://msdn.microsoft.com/en-us/library/ms177253(VS.80).aspx and
http://msdn.microsoft.com/en-us/library/84wcsx8x(VS.80).aspx.

(Or, perhaps better, make the code conformant.)
2. Ignore any warnings.
I don't think this is a good idea. Warnings should at least be checked to understand the nature of the problem - then you can decide whether to ignore it, based on that understanding.

kemuri-_9
24th July 2009, 16:51
I don't think this is a good idea. Warnings should at least be checked to understand the nature of the problem - then you can decide whether to ignore it, based on that understanding.

well, he's probably tossing out a general statement, as most of the warnings are
1. related to secure CRT methods added first in vis studio 2005
(add _CRT_SECURE_NO_WARNINGS to the preprocessor definitions to remove these warnings)
2. the loss of precision with implicit casting.

but yes, i agree you should check what the warnings are first and decide whether to deal with them or ignore them.