since it appears the author last worked on this toolkit back in 2006.
I wish I knew more about templates, unfortunately I'm just doing the
transition between C and C++..so I'm lost here..Could you check if the
code contains any obvious inaccuracies?
This is an extract from meeevent.hpp:
//-----------------------
#include <ext_algorithm.hpp>
#include "eventspace.hpp"
//...
namespace maxent {
using namespace std;
namespace me {
// Maxent Event
struct Event {
...
}
typedef size_t outcome_id_type;
typedef std::string feature_type;
typedef std::string outcome_type;
typedef EventSpace<me::EventMEEventSpace; //line 97 ERROR
typedef MEEventSpace::featmap_type FeatMapType; //line 98 ERROR
typedef ItemMap<feature_typePredMapType;
typedef ItemMap<outcome_typeOutcomeMapType;
...
} // namespace me
} // namespace maxent
These are the related errors:
/usr/local/include/maxent/meevent.hpp:97: error: expected initializer
before ‘<’ token
/usr/local/include/maxent/meevent.hpp:98: error: ‘MEEventSpace’ has
not been declared
/usr/local/include/maxent/meevent.hpp:98: error: expected initializer
before ‘FeatMapType’
The only thing I can spot from this is that it's having problems with
that EventSpace class (line 97). It's not defined anywhere before in
the file. BUT there's that "#include eventspace.hpp"..the problem is,
I DON't have this file in the /usr/local/include/maxent directory!
"make config" didn't copy it there...going back to the unpacked tar in
my home directory, where "eventspace.hpp" still is, I opened it and
indeed found the class definition. What do you think? May it be the
case? Should I try to copy this and other related files manually into /
usr/local/include/maxent? Or would this screw everything even more?
Thanks so much for your help
Giuseppe
On 7 Giu, 18:18, Paavo Helde <nob...@ebi.eewrote:
The header seems to contain templates, right? My guess would be that this
maxent library is not fully standard-conformant and does not compile
under a recent compiler version which follows the standard template
parsing rules much more exactly than earlier versions. In particular, all
symbol names not dependent of template parameters must be declared
earlier. Also the need of littering the template code with 'typename' and
'template' keywords demanded by the standard has grown over the years.
However, this is just guessing. You could look in this meevent.hpp file,
line 97, find out the symbol which the compiler is complaining about, and
find out where this symbol is declared or defined. If you cannot find out
the problem this way you could try to post the relevant pieces of code
here. *
HTH
Paavo