What is necessary to create an AviSynth plugin?
Notes: Visual C/C++ 6, 7, 7.1 Standard Edition (and NET 1.1 SDK) lack in optimizing compiler (only expensive Professional or Enterprise Edition included it). As a partial workaround you can add free Visual C++ Toolkit 2003 optimizing compiler to your Standard Edition IDE (by setting directories properly) or use Visual C++ 2005 (any edition).
Free download it from Microsoft site. The last SDK that will work with VC 6.0 was the February 2003 Edition.
You can get it with this FilterSDK, download with AviSynth source code, or take from some plugin source package. There are several versions of this header file from various AviSynth versions.
Header file avisynth.h from v1.0.x to v2.0.x have AVISYNTH_INTERFACE_VERSION = 1.
Plugins compliled with them will be not (natively) compatible with AviSynth 2.5.x.
Header file avisynth.h from v2.5.0 to v2.5.5 have AVISYNTH_INTERFACE_VERSION = 2.
Plugins compliled with them will (generally) work in AviSynth v2.5.0 to v2.5.7 (and above).
But avisynth.h files from versions v2.5.0 - v2.5.5 (and betas) are not identical.
We recommend to use avisynth.h from versions 2.5.5 or later.
Previous versions of avisynth.h are obsolete and have some bugs.
Header files avisynth.h from v2.5.6 and v2.5.7 are almost identical and have AVISYNTH_INTERFACE_VERSION = 3.
Plugins compliled with them will work in v2.5.6, v2.5.7. They will also work in v2.5.5 and below,
if you do not use new interface features and do not call env->CheckVersion
function.
New beeing developed AviSynth version 2.6.x will use new header avisynth.h probably with AVISYNTH_INTERFACE_VERSION = 4.
Plugins complied with AviSynth v2.5.x header will work in AviSynth 2.6.x too,
but plugins compliled with new AviSynth v2.6.x header will probably not work in AviSynth v2.5.x.
Generally good start is to take some similar plugin source code as a draft for improving or own development. Attention: there are many old plugins source code packages with older avisynth.h included. (for example, SimpleSample zip file contains avisynth.h file from from AviSynth v2.5.4). Simply replace it by new one.
Notes. If you use Visual C++ Toolkit 2003 itself (without VC++ 7), you can not build plugin as multi-treaded DLL: the toolkit missed some libraries, in particular msvcrt.lib. You can get additional libs with MS .NET 1.1 SDK (free download) or simply use multi-treaded option (IMHO it is better - no need in MSVCRT71.DLL).
Of course, use Release build with optimization. Typical compiler switches are /MT /O2 and /dll /nologo for linker
See step by step instructions.
You can NOT use other compiler like GNU C++ to create regular AviSynth plugins. You may also try to use some tools (GNU C++, Visual Basic, Delphi) to create so called AviSynth C plugins with AviSynth C API (but it is not mainsteam).
$Date: 2006/12/21 19:27:37 $