Building mpeg2dec on Windows XP with Visual Studio 2005


1. First download the last version of mpeg2dec. You can find it here :

http://libmpeg2.sourceforge.net/downloads.html


2. Uncompress the mpeg2dec archive into C:\, you will obtain the 
C:\mpeg2dec-0.4.0 directory for the version 0.4.0b of mpeg2dec.


3. On the Desktop, right click on "My Computer" then click on "Properties". Go 
to the "Advanced" tab and click on the "Environment Variables" button. Create a 
new "System variable" :


Variable name : MPEG2DEC_ROOT
Variable value : C:\mpeg2dec-0.4.0


4. Open the file C:\mpeg2dec-0.4.0\vc++\config.h and search for the line :
#define restrict __restrict
Replace this line with :
#define restrict


5. Download the file "ddraw.h". You can find it here :

http://www.koders.com/cpp/fidFE49BA1C9B489C3FF33CE3520B8F1596A219EF61.aspx

Copy this file in the 
"C:\mpeg2dec-0.4.0\include" directory.


6. Open the file C:\mpeg2dec-0.4.0\vc++\mpeg2dec.dsw and click on the button 
"Yes To All".


7. Go to "Build->Build Solution". 