I was having trouble compiling the sources to genes with gcc 2.95.2. The
following error shows up
gmake[3]: Entering directory `/home/jeremy/genes/genes/glade2'
c++ -DHAVE_CONFIG_H -I. -I. -I../../genes -g -O2
-I/usr/lib/gtkmm/include -I/usr/include -I/usr/lib/glib/include
-I/usr/X11R6/include -I/usr/local/lib/sigc++/include -I/usr/local/include
-c glade2UI.cpp
glade2UI.cpp: In method `void Glade2UI::doOnSelect(int, int)':
glade2UI.cpp:154: conversion from `const
list<GenesDataId,allocator<GenesDataId> >' to
`list<GenesDataId,allocator<GenesDataId> > &' discards qualifiers
gmake[3]: *** [glade2UI.o] Error 1
gmake[3]: Leaving directory `/home/jeremy/genes/genes/glade2'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/jeremy/genes/genes'
gmake[1]: *** [all-recursive-am] Error 2
gmake[1]: Leaving directory `/home/jeremy/genes/genes'
gmake: *** [all-recursive] Error 1
However, the following code changes seem to work
-list<GenesDataId>& fidList = person->getSpouceFamily();
+const list<GenesDataId>& fidList = person->getSpouceFamily();
int len = fidList.size(); // ??
cout << "spouces: " << len << endl;
-list<GenesDataId>::iterator iter = fidList.begin();
+list<GenesDataId>::const_iterator iter = fidList.begin();
Although I do have cvs access, I hesitate to change this because
1) there may be a valid reason for changing the const status of fidList,
in which case, a dynamic cast of some sort may be appropriate
2) I really don't know my way around cvs...
Also, a nitpick: "Spouse" is spelled with an s, not a c. Again, I hesitate
to change this unilaterally, as it might break things.
Jeremy
_______________________________________________
Genes-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/genes-devel