[bt-devel] Hello! and GCC 3.2
Jason Gress
bt-devel@crosswire.org
Mon, 14 Oct 2002 22:37:32 +0000
Hello! To some of you my name may seem familiar (as I made the bug report
that led to solving the memory leak in Bibletime 1.2beta1). I had been
hoping to help out for a while now, and I hope to start somewhere. :) And
so, using Gentoo 1.4 Linux version (with GCC 3.2), I was wondering - are any
of the developers using it as well? I am asking because Bibletime 1.2.1 does
not compile properly with it, and the current (as of today) cvs simply
doesn't compile ;). So, I was hoping to try to make a small patch to fix the
problems so at least I can use it, and maybe others too, as I may be able to
share the .ebuild (Gentoo's package management system) with others. I wanted
to run by you guys what I have found (though some may have been fixed in cvs,
not sure) and I would be more than happy to help you guys test, and hopefully
solve some more simple problems with GCC 3.2 compliance. I do know some C++,
as I have taken two semesters and am in the middle of my third. So, here is
what I have found so far, with my comments as I feel necessary. I apologize
ahead of time if I state the obvious; at my level of C++ skill, a so-called
"revelation" may be "duh" obvious to you ;) but what can I do :).
All testing was done with a plain ./configure. SWORD 1.5.4 is installed.
1) in bibletime-1.2.1/bibletime/backend/cswordbookmoduleinfo.cpp:
cswordbookmoduleinfo.cpp:55: `cout' undeclared (first use this function)
I simply added #include <iostream>
2) in bibletime-1.2.1/bibletime/printing/cprintdialogpages.cpp:
cprintdialogpages.cpp: In constructor
`CStyleListPage::CStyleListPage(CPrinter*, QWidget*, const char*)':
cprintdialogpages.cpp:57: declaration of `name' shadows a parameter
This one stumped me at first; but it seems to be that the array "name[4]" on
line 57 is of the same "name" (no pun intended) as the const char * name
parameter for the function. I changed the name <g> name[4] to uppercase to
try, and what appears to be its reference on line 64. Don't know if that
fixed it, but it compiles now ;).
3) in bibletime-1.2.1/bibletime/frontend/presenters/cbiblepresenter.cpp,
This one is wierd:
cbiblepresenter.cpp: In member function `virtual void
CBiblePresenter::storeSettings(CProfileWindow*)':
cbiblepresenter.cpp:411: call of overloaded `pow(int, int)' is ambiguous
/usr/include/bits/mathcalls.h:143: candidates are: double pow(double, double)
/usr/include/g++-v32/cmath:427: long double std::pow(long
double, int)
/usr/include/g++-v32/cmath:423: float std::pow(float, int)
/usr/include/g++-v32/cmath:419: double std::pow(double, int)
/usr/include/g++-v32/cmath:410: long double std::pow(long
double, long double)
/usr/include/g++-v32/cmath:401: float std::pow(float, float)
cbiblepresenter.cpp: In member function `virtual void
CBiblePresenter::applySettings(CProfileWindow*)':
cbiblepresenter.cpp:422: call of overloaded `pow(int, int)' is ambiguous
/usr/include/bits/mathcalls.h:143: candidates are: double pow(double, double)
/usr/include/g++-v32/cmath:427: long double std::pow(long
double, int)
/usr/include/g++-v32/cmath:423: float std::pow(float, int)
/usr/include/g++-v32/cmath:419: double std::pow(double, int)
/usr/include/g++-v32/cmath:410: long double std::pow(long
double, long double)
/usr/include/g++-v32/cmath:401: float std::pow(float, float)
cbiblepresenter.cpp:423: call of overloaded `pow(int, int)' is ambiguous
/usr/include/bits/mathcalls.h:143: candidates are: double pow(double, double)
/usr/include/g++-v32/cmath:427: long double std::pow(long
double, int)
/usr/include/g++-v32/cmath:423: float std::pow(float, int)
/usr/include/g++-v32/cmath:419: double std::pow(double, int)
/usr/include/g++-v32/cmath:410: long double std::pow(long
double, long double)
/usr/include/g++-v32/cmath:401: float std::pow(float, float)
Apparently, it can't decide which pow to overload to, even though it seems to
me it should clearly be an int. Oh well, my little hack (and it is) is to
force it to be a double with .0's on the end of some of the numbers and with
the already existing (int) typecase it should work.. not happy but might do
the trick..
4) This is the one I cannot get past, and I am looking for ideas.
In bibletime-1.2.1/bibletime/frontend/searchdialog/csearchdialog.cpp:
csearchdialog.cpp: In member function `void
CSearchDialog::setModuleList(ListCSwordModuleInfo&)':
csearchdialog.cpp:117: no match for `ListCSwordModuleInfo& !=
QPtrList<CSwordModuleInfo>&' operator
/usr/qt/3/include/qcstring.h:299: candidates are: bool operator!=(const
QCString&, const QCString&)
/usr/qt/3/include/qcstring.h:302: bool operator!=(const
QCString&, const char*)
/usr/qt/3/include/qcstring.h:305: bool operator!=(const char*,
const QCString&)
/usr/qt/3/include/qstring.h:306: bool operator!=(QChar, QChar)
/usr/qt/3/include/qstring.h:311: bool operator!=(char, QChar)
/usr/qt/3/include/qstring.h:316: bool operator!=(QChar, char)
/usr/qt/3/include/qstring.h:828: bool operator!=(const
QString&, const QString&)
/usr/qt/3/include/qstring.h:835: bool operator!=(const
QString&, const char*)
/usr/qt/3/include/qstring.h:841: bool operator!=(const char*,
const QString&)
/usr/qt/3/include/qpoint.h:151: bool operator!=(const QPoint&,
const QPoint&)
/usr/qt/3/include/qsize.h:155: bool operator!=(const QSize&,
const QSize&)
/usr/qt/3/include/qrect.h:139: bool operator!=(const QRect&,
const QRect&)
It seems obvious it is another matching error of sorts, but I am not familiar
with the classes, etc. Bibletime uses, so I can't fix this without help. Any
ideas? I am hoping that when all is said and done, the *Great* Bibletime can
be GCC 3.2 compliant! :)
Your Brother in Christ,
Jason Gress