Building Avisynth 3.0 for Windows using VC++ .NET 2003 (VC 7.1)

Summary

Presentation

To successfully compile AviSynth v3 with Microsoft Visual C++ .NET 2003, you first need to obtain some additional libraries and tools. The order in which you compile them is important, so please follow this small guide. The dependencies are the following:

I used a folder C:/tmp/ to put everything in. If you want to put the stuff somewhere else, don't forget to change the paths accordingly.

Download dependencies

First, download the following libraries in the folder C:/tmp.

Installation of STLport 5.0.2

Unpack the archive STLport-5.0.2.tar.bz2 to C:/tmp (you can unpack tar.bz2 files with winzip).

Open up a command prompt and give the following commands (assuming everything ended up in a folder C:/tmp/STLPORT/):

C:/tmp/STLport> "c:/Program files/Microsoft Visual Studio .NET 2003/Common7/Tools/vsvars32.bat"
C:/tmp/STLport> cd build/lib
C:/tmp/STLport> nmake -f nmake-vc71.mak clean all
C:/tmp/STLport> cd ../../lib
C:/tmp/STLport> copy STLPORT_VC7146.dll %WinDir%/System32/

If you installed Visual Studio in a different location, don't forget to adjust the path to vsvars32.bat. Don't forget the double quotes!

Close the dialog boxes and close VC.net.

Installation of Boost 1.33.1

Unzip the file boost_1_33_1.zip located in C:/tmp/ in this folder and, in the archive boost-jam-3.1.12-1-ntx86.zip, you will find bjam.exe. Put this file in C:/tmp/boost_1_33_1/. To compile boost, open up a command prompt and give the following commands (assuming everything ended up in a folder C:/tmp/boost_1_33_1/):

C:/tmp/BOOST_1_33_1>"c:/Program files/Microsoft Visual Studio .NET 2003/Common7/Tools/vsvars32.bat" 
C:/tmp/BOOST_1_33_1>bjam "-sTOOLS=vc7.1-stlport" "-sSTLPORT_PATH=C:/tmp" --with-thread stage

You will see some errors about boost.python and file not found error's. These can safely be ignored. The only important thing is that when bjam is finished, C:/tmp/boost_1_33_1/stage/lib/boost_thread-vc71-mt-p-1_33.lib was created. Make sure that you copy this dll to your Windows system folder.

Next, add a new include path and library path, just as in Installation of STLport 5.0.2 :

Installation of Freetype 2.2.1

Not done yet.

Installation of Fonconfig 2.3.2

Not done yet.

Installation of Nasm

unzip the file nasm/nasm-0.98.39-win32.zip located in C:/tmp. Rename nasmw.exe to nasm.exe.

Start up VC.net and

Close the dialog boxes and close VC.net.

Installation of Avisynth 3.0

Right now, the source code of Avisynth 3.0 is only available on cvs. It is assumed you have installed WinCVS or TortoiseCVS, otherwise you have to do that first. You can use either the gui to get the avisynth_3_0 branch, or the command prompt (for W2K for example: go to the desktop, right click on 'My Computer' -> Properties -> Advanced tab -> Environment Variables -> select the Variable 'path' -> edit -> add the path to WinCVS/TortoiseCVS where cvs.exe is located) to get it:

Make an empty folder called: C:/tmp (or whatever). Open a command prompt and use the following commands:

cd C:/tmp
C:/tmp> cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/avisynth2 co -r avisynth_3_0 avisynth

This will get you the AviSynth v3 branch (note "co" means "check out", and "-r" will get you the branch).

Now you can compile Avisynth 3.0:

You now should have an avisynth.dll in C:/tmp/avs_v3/avisynth/build/win32/vc71/Release/

Additional remarks


Generated on Sun Jul 30 18:46:52 2006 for Avisynth by  doxygen 1.4.7