[MPlayer-cvslog] CVS: main/libmpdemux demuxer.h,1.88,1.89

Rich Felker dalias at aerifal.cx
Thu Mar 9 23:15:44 CET 2006


On Wed, Mar 08, 2006 at 09:51:06PM +0100, Jindrich Makovicka wrote:
> Rich Felker wrote:
> > This is NOT CORRECT! Reverse!
> > If you're getting a warning it means you forgot to include stdlib.h,
> > and casting the integer return value of malloc to a pointer will NOT
> > fix the problem, just hide it!
> 
> This is not about missing prototypes, this is about C++.
> 
> cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4
> -march=athlon-xp -mtune=athlon-xp -pipe -ffast-math -fomit-frame-pointer
> -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I..
> -I../loader       -I/usr/include/liveMedia
> -I/usr/include/UsageEnvironment
>                                   -I/usr/include/BasicUsageEnvironment
> 
> -I/usr/include/groupsock -o demux_rtp.o demux_rtp.cpp
> demuxer.h: In function 'demux_packet_t* new_demux_packet(int)':
> demuxer.h:193: error: invalid conversion from 'void*' to 'unsigned char*'

If the code is used inside a C++ module, it needs to be inside an
extern "C" { } block! Add the appropriate extern "C" around the
#include line!

Rich




More information about the MPlayer-cvslog mailing list