[XviD-devel] DShow Build Issues

Michael Militzer michael at xvid.org
Fri Feb 25 20:49:52 CET 2011


Hi Brendan,

your declaration of InterlockedDecrement() in winbase.h is already volatile
(for whatever reason). Try to comment out the second declaration in
combase.h. It should not be needed because your winbase.h declared function
already takes volatiles...

Regards,
Michael


Quoting Brendan Brewster <brendan.brewster at gmail.com>:

> Hi Michael,
>
> My copy of winbase.h has:
>
> LONG WINAPI InterlockedDecrement(LONG volatile *);
>
> And the following in combase.h:
>
> static inline LONG WINAPI InterlockedDecrement( volatile LONG * plong )
> { return InterlockedDecrement( const_cast<LONG*>( plong ) ); }
>
> It would appear that our copies of combase.h have the same entries (not
> surprising to me) but our entries differ in winbase.h
>
> Thanks,
> -Brendan
>
> On Fri, Feb 25, 2011 at 12:05 PM, Michael Militzer <michael at xvid.org> wrote:
>
>> Hi Brendan,
>>
>> I can still compile the dshow filter without issue using a mingw based on
>> gcc 3.4.6. So I'm surprised it doesn't work with your config.
>>
>> What do the definitions of InterlockedDecrement() look like for you?
>>
>> I have the following in winbase.h:
>>
>> LONG WINAPI InterlockedDecrement(LPLONG);
>>
>> And this in combase.h:
>>
>> static inline LONG WINAPI InterlockedDecrement( volatile LONG * plong )
>> { return InterlockedDecrement( const_cast<LONG*>( plong ) ); }
>>
>> Regards,
>> Michael
>>
>>
>> Quoting Brendan Brewster <brendan.brewster at gmail.com>:
>>
>> > I am having issues building the dshow module. The directx that I am using
>> is
>> > the patched version of the software development kit update (summer 2003)
>> and
>> > have used it in the past to build this module (probably years ago). A
>> > difference from that of the readme is that I am running an updated cygwin
>> > 1.5.25 that has gcc 3.4.4. The errors I get are as follows:
>> >
>> > $ make DXTREE=/cygdrive/d/dx90
>> >   D: =build
>> >   C: ./config.c
>> >   C: ./debug.c
>> >   C: ./Configure.cpp
>> > In file included from <command line>:10:
>> > /cygdrive/d/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
>> > In file included from
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/windows.h:52,
>> >                  from
>> > /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/rpc.h:2,
>> >                  from
>> > /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wtypes.h:1,
>> >                  from /cygdrive/d/dx90/mingw_dshow_port.h:1,
>> >                  from <command line>:10:
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:3:1:
>> > warning: this is the location of the previous definition
>> >   C: ./CAbout.cpp
>> > In file included from <command line>:10:
>> > /cygdrive/d/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
>> > In file included from
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/windows.h:52,
>> >                  from
>> > /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/rpc.h:2,
>> >                  from
>> > /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wtypes.h:1,
>> >                  from /cygdrive/d/dx90/mingw_dshow_port.h:1,
>> >                  from <command line>:10:
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:3:1:
>> > warning: this is the location of the previous definition
>> > In file included from
>> > /cygdrive/d/dx90/Samples/C++/DirectShow/BaseClasses/streams.h:142,
>> >                  from src/CAbout.h:29,
>> >                  from src/CAbout.cpp:36:
>> > /cygdrive/d/dx90/Samples/C++/DirectShow/BaseClasses/combase.h: In
>> function
>> > `LONG InterlockedIncrement(volatile LONG*)':
>> > /cygdrive/d/dx90/Samples/C++/DirectShow/BaseClasses/combase.h:245: error:
>> > `LONG InterlockedIncrement(volatile LONG*)' was declared `extern' and
>> later
>> > `static'
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1694:
>> > error: previous declaration of `LONG InterlockedIncrement(volatile
>> LONG*)'
>> > /cygdrive/d/dx90/Samples/C++/DirectShow/BaseClasses/combase.h: In
>> function
>> > `LONG InterlockedDecrement(volatile LONG*)':
>> > /cygdrive/d/dx90/Samples/C++/DirectShow/BaseClasses/combase.h:248: error:
>> > `LONG InterlockedDecrement(volatile LONG*)' was declared `extern' and
>> later
>> > `static'
>> >
>> /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winbase.h:1685:
>> > error: previous declaration of `LONG InterlockedDecrement(volatile
>> LONG*)'
>> > make: *** [CAbout.obj] Error 1
>> >
>> > Is there any workaround so that I may compile this module without somehow
>> > back versioning my gcc install in cygwin?
>> >
>> > Any input is appreciated!
>> >
>> > Thanks,
>> > -Brendan
>> > _______________________________________________
>> > Xvid-devel mailing list
>> > Xvid-devel at xvid.org
>> > http://list.xvid.org/mailman/listinfo/xvid-devel
>> >
>> >
>>
>>
>>
>> _______________________________________________
>> Xvid-devel mailing list
>> Xvid-devel at xvid.org
>> http://list.xvid.org/mailman/listinfo/xvid-devel
>>
> _______________________________________________
> Xvid-devel mailing list
> Xvid-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>




More information about the Xvid-devel mailing list