[mythtv] [mythgame] CVS failes to compile added patch

Tommy Faasen mythtv at zwanebloem.nl
Fri Apr 23 05:59:25 EDT 2004


On Thu, Apr 22, 2004 at 09:25:11AM -0800, Dan Morphis wrote:
> Well, that code has been there for 2 months and your the only one who 
> has complained about it.  So, I would suspect the problem with people 
Well the code change is only in CVS, and most developers tend to have
more recent compilers and/or not everybody is interested in mythgame..
Maybe it's a non-issue as you say and it only affects me (although I
would like other people to confirm that so I can do something about it),
but my feeling is if it's going to be an issue it will be when 0.15 is 
going to be released.

> not running a more recent version of gcc isn't a very big one.  you said 
> your running debian, whats hard about running apt-get upgrade gcc?
> 
That 2.95.4 is the most recent version for debian stable.

I finally took some time to understand this problem(I'm more of a C/perl
guy,qt/c++ is still a bit new for me...) and came with a patch for it
which compiles under 2.95 and 3.0

Tommy


> -dan
> 
> Tommy Faasen wrote:
> 
> >On Wed, Apr 21, 2004 at 11:25:16AM -0800, Dan Morphis wrote:
> > 
> >
> >>The problem is your using an old version of gcc.  Upgrade to 3.3.2.  A 
> >>lot of stuff has changed if I recall correctly between 2.95 and the 3.3 
> >>branch.
> >>   
> >>
> >
> >
> >Isn't that a big requirement since only mythgame requires that to
> >compile? I assume that many people still using 2.95.x or even compilers
> >less then the 3.3 branch...
> >
> >This won't be an easy thing to do for most people.. so you're willing to
> >lose users because of this?
> >
> >Can't the problem be solved by changing the code? I still don't
> >understand why the compiler is puking as you put it?
> >
> >
> >Tommy
> > 
> >
> >>-dan
> >>
> >>Tommy Faasen wrote:
> >>
> >>   
> >>
> >>>On Wed, Apr 21, 2004 at 08:09:48AM -0800, Dan Morphis wrote:
> >>>
> >>>
> >>>     
> >>>
> >>>>What version of gcc are you using to compile?  I wrote that piece of 
> >>>>code it's puking on and it compiles fine for me.  I'm using: gcc 
> >>>>version 3.3.2 20031022
> >>>>
> >>>> 
> >>>>
> >>>>       
> >>>>
> >>>I use debian stable gcc 2.95.4 else mythtv itself won't compile with kde
> >>>3.2.1.
> >>>
> >>>I tried gcc 3.0.4 which had no problems but like I said that won't
> >>>compile mythtv itself on my system
> >>>
> >>>
> >>>So what's the problem??
> >>>
> >>>regards,
> >>>
> >>>Tommy
> >>>
> >>>
> >>>     
> >>>
> >>>>-dan
> >>>>
> >>>>Tommy Faasen wrote:
> >>>>
> >>>> 
> >>>>
> >>>>       
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>I get this error,
> >>>>>
> >>>>>cd mythgame && make -f Makefile
> >>>>>make[1]: Entering directory 
> >>>>>`/mnt/fast/newsan/mythcvs/mythgame/mythgame'
> >>>>>g++ -c -pipe -Wall -W -O3 -march=pentiumpro -fomit-frame-pointer
> >>>>>-D_REENTRANT -fPIC  -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -DQT_NO_DEBUG
> >>>>>-DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
> >>>>>-I/usr/share/qt3/mkspecs/default -I. -I/usr/local/include
> >>>>>-I/usr/include/qt3 -o mamehandler.o mamehandler.cpp
> >>>>>mamehandler.cpp: In method `void MameHandler::makecmd_line(const char 
> >>>>>*,
> >>>>>QString *, MameRomInfo *)':
> >>>>>mamehandler.cpp:970: ambiguous overload for `QString & ? QString & :
> >>>>>const char[2]'
> >>>>>mamehandler.cpp:970: candidates are: operator ?:(bool, QString, 
> >>>>>QString)
> >>>>><builtin>
> >>>>>mamehandler.cpp:970:                 operator ?:(bool, const char *,
> >>>>>const char *) <builtin>
> >>>>>make[1]: *** [mamehandler.o] Error 1
> >>>>>make[1]: Leaving directory `/mnt/fast/newsan/mythcvs/mythgame/mythgame'
> >>>>>make: *** [sub-mythgame] Error 2
> >>>>>
> >>>>>I know to little about overloading to see what's wrong??
> >>>>>
> >>>>>No problem fixing it if somebody would point me in the right direction.
> >>>>>
> >>>>>
> >>>>>Regards,
> >>>>>
> >>>>>Tommy
> >>>>>
> >>>>>
> >>>>>------------------------------------------------------------------------
> >>>>>
> >>>>>_______________________________________________
> >>>>>mythtv-dev mailing list
> >>>>>mythtv-dev at mythtv.org
> >>>>>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> >>>>>
> >>>>>
> >>>>>   
> >>>>>
> >>>>>         
> >>>>>
-------------- next part --------------
Index: mythgame/mythgame/mamehandler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythgame/mythgame/mamehandler.cpp,v
retrieving revision 1.29
diff -u -r1.29 mamehandler.cpp
--- mythgame/mythgame/mamehandler.cpp	10 Apr 2004 18:47:18 -0000	1.29
+++ mythgame/mythgame/mamehandler.cpp	23 Apr 2004 09:56:00 -0000
@@ -967,7 +967,7 @@
         *exec+= volume;
         *exec+=  " ";
         *exec+= game_settings.cheat ? " -cheat " : " -nocheat ";
-        *exec+= game_settings.extra_options ? game_settings.extra_options : " ";
+        *exec+= game_settings.extra_options ? (const char *)game_settings.extra_options : " ";
         
         *exec+= " ";
         *exec+= game;


More information about the mythtv-dev mailing list