[Mplayer-dev-eng] mplayer-cvs doesn't compile with gcc-3.0 (debian sid) + paSat Jun 9 02:24:00 2001

pl p_l at tfz.net
Sat Jun 9 12:40:23 CEST 2001


On Sat, Jun 09, 2001 at 02:26:13AM +0200, Arpi wrote:a
[...]
> > I've had a few troubles with compiling mplayer-cvs with
> > gcc/g++-3.0 (the one shipping with debian unstable aka
> > gcc version 3.0 20010526 (Debian prerelease) & GNU 
> > assembler 2.11.90.0.7)
[...]
> >  - a few missing std:: that breaks compilation
> I added missing 'using namespace std;', it's much nicer.

But it doesn't fix the problem here. debian's gcc seems not to enjoy 
"string.h" and "std".

The patch enclosed should fix this (tested with gcc 2.95.4 and 3.0).
Btw there is still a "using namespace std;" left, which should be enough
I guess.

*** Errors samples
gcc-3.0 -c -O4 -march=athlon -mcpu=athlon -pipe -ffast-math -fomit-frame-pointer -I. -I.. -I../wine -o DS_AudioDec.o DS_AudioDec.cpp
In file included from DS_AudioDec.cpp:40:
BitmapInfo.h: In constructor `BitmapInfo::BitmapInfo(int, int, int)':
BitmapInfo.h:16: call of overloaded `memset(BitmapInfo* const, int, unsigned
   int)' is ambiguous
/usr/include/string.h:55: candidates are: void* memset(void*, int, unsigned
   int)
/usr/include/g++-v3/bits/std_cstring.h:194:                 void*
   std::memset(void*, int, unsigned int)
[...]

--
pl
-------------- next part --------------
--- ./loader/DirectShow/DS_AudioDec.cpp~	Sat Jun  9 12:12:03 2001
+++ ./loader/DirectShow/DS_AudioDec.cpp	Sat Jun  9 12:13:23 2001
@@ -9,7 +9,6 @@
 //#include <config.h>
 
 //#include "DS_AudioDecoder.h"
-#include <string.h>
 #include <stdlib.h>
 #include <except.h>
 #define __MODULE__ "DirectShow_AudioDecoder"
@@ -52,7 +51,6 @@
 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71};
 
 
-using namespace std;
 extern "C" char* def_path;
 
     static DS_Filter* dsf=0;
--- ./loader/DirectShow/DS_VideoDec.cpp~	Sat Jun  9 12:12:10 2001
+++ ./loader/DirectShow/DS_VideoDec.cpp	Sat Jun  9 12:13:44 2001
@@ -9,7 +9,6 @@
 //#include <config.h>
 
 //#include "DS_VideoDecoder.h"
-#include <string.h>
 #include <stdlib.h>
 #include <except.h>
 #define __MODULE__ "DirectShow_VideoDecoder"
@@ -45,7 +44,6 @@
 #include "DS_VideoDec.h"
 
 
-using namespace std;
 extern "C" char* def_path;
 
     static char** m_destptr=0;


More information about the MPlayer-dev-eng mailing list