[bt-devel] Re: make fails in chtmlreaddisplay.cpp

John A. Sullivan III jsullivan at opensourcedevel.com
Sun Jul 3 20:19:57 MST 2005


On Sun, 2005-07-03 at 23:10 -0400, John A. Sullivan III wrote:
> Hello all.  First, thank you for bibletime.  As I am also a maintainer
> of an open source project I am familiar with some of the challenges you
> must face.
> 
> I am running Fedora Core 4 on an AMD 64.  I downloaded, compiled and
> installed Sword 1.5.8 and then attempted to compile bibletime-1.5rc2.  I
> fail with the following errors:
> 
> chtmlreaddisplay.cpp: In member function ‘virtual const QString
> CHTMLReadDisplay::text(CDisplay::TextType, CDisplay::TextPart)’:
> chtmlreaddisplay.cpp:60: warning: ‘toHTML’ is deprecated (declared
> at /usr/include/kde/dom/dom_node.h:869)
> chtmlreaddisplay.cpp: In member function ‘virtual void
> CHTMLReadDisplay::khtmlMouseMoveEvent(khtml::MouseMoveEvent*)’:
> chtmlreaddisplay.cpp:302: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:302: error: ‘ListInfoData’ was not declared in this
> scope
> chtmlreaddisplay.cpp:302: error: expected `;' before ‘infoList’
> chtmlreaddisplay.cpp:307: error: ‘infoList’ was not declared in this
> scope
> chtmlreaddisplay.cpp:307: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:307: error: ‘Footnote’ was not declared in this
> scope
> chtmlreaddisplay.cpp:312: error: ‘infoList’ was not declared in this
> scope
> chtmlreaddisplay.cpp:312: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:312: error: ‘Lemma’ was not declared in this scope
> chtmlreaddisplay.cpp:317: error: ‘infoList’ was not declared in this
> scope
> chtmlreaddisplay.cpp:317: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:317: error: ‘Morph’ was not declared in this scope
> chtmlreaddisplay.cpp:322: error: ‘infoList’ was not declared in this
> scope
> chtmlreaddisplay.cpp:322: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:322: error: ‘Abbreviation’ was not declared in this
> scope
> chtmlreaddisplay.cpp:341: error: ‘infoList’ was not declared in this
> scope
> chtmlreaddisplay.cpp:341: error: ‘CInfoDisplay’ has not been declared
> chtmlreaddisplay.cpp:341: error: ‘CrossReference’ was not declared in
> this scope
> chtmlreaddisplay.cpp:369: error: ‘infoList’ was not declared in this
> scope
> make[4]: *** [chtmlreaddisplay.o] Error 1
> 
> I downloaded the latest chtmlreaddisplay.cpp from CVS but received the
> same errors.  I am not an experienced developer but I could not see why
> this is failing.  What is the problem and what must I do to successfully
> compile? Thanks - John

Apparently the problem is incompatibility with gcc 4.0 and its handling
of namespaces.  I really do not know what I am doing but I did finally
get BibleTime to successfully compile by making several changes to the
source files.  Here is what I had to do:

in cinfodisplay.cpp before line 47 I added:
namespace InfoDisplay {
and closed the brace at the end of the file.  It seems like the
namespace must be defined in both the declaration and the definition.

Before chtmlreaddisplay.cpp:303 (CInfoDisplay::ListInfoData infoList;),
I added the line:
using InfoDisplay::CInfoDisplay;

In cpointers.cpp:28, I needed to change the signature to:
void CPointers::setInfoDisplay(InfoDisplay::CInfoDisplay* const
infoDisplay)
That is, I needed an explicit reference to the InfoDisplay namespace.

Similarly, I changed bibletime_init.cpp:78 to:
m_infoDisplay = new InfoDisplay::CInfoDisplay(m_leftPaneSplitter);

And bibletime.h:393 to:
InfoDisplay::CInfoDisplay* m_infoDisplay;

Then I successfully compiled.  Hope this helps - John
-- 
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan at opensourcedevel.com

If you would like to participate in the development of an open source
enterprise class network security management system, please visit
http://iscs.sourceforge.net




More information about the bt-devel mailing list