[Mplayer-dev-eng] mplayer-cvs doesn't compile with gcc-3.0 (debian sid) Sat Jun 9 16:50:05 2001

pl p_l at tfz.net
Sun Jun 10 01:53:44 CEST 2001


Hi,

On Sat, Jun 09, 2001 at 04:51:39PM +0200, Arpi wrote:
[...]
> > 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.
> 
> Fixed, thanks...
> I've not noticed that namespace std was already in those file :(
> 
> I don't fully understand that code, and it's merged sometimes with avifile,
> so strange things can be there :)
[...]

Tonight's cvs still breaks with gcc-3.0 !
The "bad" "using namespace std" was removed :)

Indeed, as far as I understand it, this namespace must be before the 
line : #include "BitmapInfo.h"
since this file is a template that uses memcpy/memset instructions
and this makes gcc complain...

You can apply the enclosed diff or else just add a "using namespace std;" at
the beginning of loader/DirectShow/BitmapInfo.h.

--
pl, hoping closing the thread :)
-------------- next part --------------
diff -ru main-cvs/loader/DirectShow/DS_AudioDec.cpp main/loader/DirectShow/DS_AudioDec.cpp
--- main-cvs/loader/DirectShow/DS_AudioDec.cpp	Sun Jun 10 01:10:46 2001
+++ main/loader/DirectShow/DS_AudioDec.cpp	Sun Jun 10 01:19:39 2001
@@ -9,7 +9,7 @@
 //#include <config.h>
 
 //#include "DS_AudioDecoder.h"
-//#include <string.h>
+using namespace std;
 #include <stdlib.h>
 #include <except.h>
 #define __MODULE__ "DirectShow_AudioDecoder"
@@ -50,7 +50,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;
diff -ru main-cvs/loader/DirectShow/DS_VideoDec.cpp main/loader/DirectShow/DS_VideoDec.cpp
--- main-cvs/loader/DirectShow/DS_VideoDec.cpp	Sun Jun 10 01:10:47 2001
+++ main/loader/DirectShow/DS_VideoDec.cpp	Sun Jun 10 01:20:53 2001
@@ -9,7 +9,7 @@
 //#include <config.h>
 
 //#include "DS_VideoDecoder.h"
-//#include <string.h>
+using namespace std;
 #include <stdlib.h>
 #include <except.h>
 #define __MODULE__ "DirectShow_VideoDecoder"
@@ -44,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