Mailing List Archive

compiling mythtv (latest cvs) with gcc 3.1
I was compiling mythtv with gcc 3.1:

gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure --prefix=/usr --enable-shared --enable-languages=c,c++ --enable-threads=posix --with-slibdir=/lib
Thread model: posix
gcc version 3.1


and I got this from the compiler:

cd mythdialog && make -f Makefile
make[1]: Entering directory `/usr/src/mythtv/cvs/MC/mythdialog'
g++ -c -pipe -Wall -W -O6 -march=pentiumpro -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -finline-functions -D_REENTRANT -D_GNU_SOURCE -DMMX
-DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/local/include -I/usr/local/qt/include -I/usr/local/qt/mkspecs/default -o dialogbox.o dialogbox.cpp
cc1plus: warning: changing search order for system directory "/usr/local/include"
cc1plus: warning: as it has already been specified as a non-system directory
dialogbox.cpp:12: default argument given for parameter 2 of `
DialogBox::DialogBox(const QString&, const char* = 0, QWidget* = 0, const
char* = 0)'
dialogbox.h:17: after previous specification in `DialogBox::DialogBox(const
QString&, const char* = 0, QWidget* = 0, const char* = 0)'
dialogbox.cpp:12: default argument given for parameter 3 of `
DialogBox::DialogBox(const QString&, const char* = 0, QWidget* = 0, const
char* = 0)'
dialogbox.h:17: after previous specification in `DialogBox::DialogBox(const
QString&, const char* = 0, QWidget* = 0, const char* = 0)'
dialogbox.cpp:12: default argument given for parameter 4 of `
DialogBox::DialogBox(const QString&, const char* = 0, QWidget* = 0, const
char* = 0)'
dialogbox.h:17: after previous specification in `DialogBox::DialogBox(const
QString&, const char* = 0, QWidget* = 0, const char* = 0)'
dialogbox.cpp: In constructor `DialogBox::DialogBox(const QString&, const
char*, QWidget*, const char*)':
dialogbox.cpp:25: warning: passing `float' for argument 2 of `
QFont::QFont(const QString&, int, int, bool)'
dialogbox.cpp:31: warning: passing `float' for argument 2 of `
QVBoxLayout::QVBoxLayout(QWidget*, int, int, const char*)'
make[1]: *** [dialogbox.o] Error 1
make[1]: Leaving directory `/usr/src/mythtv/cvs/MC/mythdialog'
make: *** [sub-mythdialog] Error 2



How can I fix this?


thanks,
Chris
Re: compiling mythtv (latest cvs) with gcc 3.1 [ In reply to ]
On Wednesday 07 August 2002 07:02 pm, Chris Kleeschulte wrote:
> I was compiling mythtv with gcc 3.1:
>
<snip>
>
> and I got this from the compiler:
>
<snip>
>
>
> How can I fix this?

Edit the .cpp file, and on line 12, remove the '= 0' part of each argument.
My mistake for cutting and pasting from the header files. Seems like g++3.1
doesn't like default arguments defined in multiple places. You'll have to
make similar changes in a couple other files... I'll commit a fix to CVS in
a bit (I've got some things to finish in the new menu code first), if you
want to wait.

Isaac