[XviD-devel] Building on Windows XP / Visual Studio 2005

Bill Mccormick billmcc64 at gmail.com
Tue Mar 11 14:51:12 CET 2008


I recently got it to build in VS8.   Here are my notes, maybe they
will help.  I'm not doing this for production use right now, so I
haven't gotten to the bottom of any of the issues noted, I just used
workarounds.

Bill

XVID Build Project

1.   You have to install nasm as this is the preferred assembler for
the project.   This is available from the nasm project on sourceforge.

2.   Convert the VS6 projects to VS8.

3.  Some of the assembly files don't assemble.   Open up the custom
build step by right clicking on the file and selecting properties.
The includes option comes as                      -I"$(InputDir)"\
and this seems to confuse everybody.   If you change it to
         –I$(InputDir)\   i.e. remove the quotes, then the assembler
seems to work.

4.  There are a large number of 4996 warnings due to microsoft's
unilateral deprecation of some std c functions, disable these so you
can see what's going on.

5.  There's a missing #define in portab.h (see
http://list.xvid.org/pipermail/xvid-devel/2006-May/005369.html )   You
need to add a new line at about line 79 which defines the preprocessor
symbol _INTPTR_T_DEFINED

XVID DirectShow Project

6.  The directshow project uses the directshow base classes.   Need to
set this up for everything to work.  This is the usual business of
setting up a link to the streams.h header file from the baseclasses
and linking in the base class library and strmiids.lib.

7.  The linker complains that it can't find the right constructor for
the CVideoTransformFilter base class.    The xvid code thinks that a
TCHAR is defined as char, while the base classes think that a TCHAR is
defined as wchar.    This is happening because the xvid project does
not have the symbol UNICODE defined, but the baseclasses project does.
  If I try and define the UNICODE symbol manually the entire xvid
build blows up.    Until I find out more, I have changed the parameter
type to a wchar_t * and passed in a L"CXvidDecoder".

8.  I am now getting a linker warning LNK4210 that says there may be
unhandled static initializers or terminators.   This is occurring
because the linker command line has the /ENTRY:"DllMain" parameter.
According to MSDN, if you use this option, then the DLL entry function
must call _CRT_INIT().     The xvid dshow project doesn't do this, it
calls the DllEntryPoint() function in the baseclasses library.
DllEntryPoint() doesn't initialize the CRT either.   Oddly the default
behaviour of the linker is to add a _DllMainCRTStartup() function
which initializes the CRT and then calls DlllMain.   So I am going to
remove the /ENTRY option as this seems like the desired behaviour.


9.  Where is the xvid encoder directshow filter?   The xvid encoder is
installed using the very old video for windows framework.   Directshow
wraps up video compressors installed this way; this is why there is no
explicit directshow filter for the xvid encoder.  Presumably there are
some limitations on how well old vfw stuff integrates into DirectShow
and this is why both xvid and divx have a directshow decoder filter,
but a vfw video compressor.






On 3/11/08, Brad O'Hearne <brado at neurofire.com> wrote:
> All,
>
> I am having trouble building XVID on Windows XP using Visual Studio
> 2005. My debug log is attached. Can anyone enlighten me as to why this
> isn't building? I do not believe the warnings are the cause of the
> problem. Googling has returned references to issues with spaces in
> pathnames, but my projects don't reside in a path with spaces in the
> pathname. Your help is appreciated.
>
> Thanks!
>
> Brad
>
>
>
>
>
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>


-- 
Bill McCormick


More information about the XviD-devel mailing list