jpstewart wrote:
I can tell you the problem is not IRIX, but with MIPS Pro. It seems to compile fine on IRIX with GCC in a quick test. I'm not (yet) sure why MIPS Pro is failing, other than that it doesn't seem to like ccutil/strngs.h from the Tesseract distribution.
Could easily be something I've done that's drastically wrong .... here's just a few of the initial error messages, maybe that will give someone a hint ? It doesn't seem to be only one type or error, we've got everything in there but the kitchen sink

Code:
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1166 CC: ERROR File = strngs.h, Line = 1
Expected a declaration.
/**********************************************************************
^
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1020 CC: ERROR File = strngs.h, Line = 68
The identifier "STRING" is undefined.
BOOL8 operator!= (const STRING & string) const;
^
cc-1287 CC: ERROR File = strngs.h, Line = 68
A type qualifier on this function is not allowed.
BOOL8 operator!= (const STRING & string) const;
^
cc-1319 CC: ERROR File = strngs.h, Line = 68
Too few parameters are specified for this operator function.
BOOL8 operator!= (const STRING & string) const;
^
cc-3378 CC: ERROR File = strngs.h, Line = 68
A nonmember operator requires a parameter with "class" or "enum" type.
BOOL8 operator!= (const STRING & string) const;
^
cc-1287 CC: ERROR File = strngs.h, Line = 69
A type qualifier on this function is not allowed.
BOOL8 operator!= (const char *string) const;
^
cc-1319 CC: ERROR File = strngs.h, Line = 69
Too few parameters are specified for this operator function.
BOOL8 operator!= (const char *string) const;
^
cc-3378 CC: ERROR File = strngs.h, Line = 69
A nonmember operator requires a parameter with "class" or "enum" type.
BOOL8 operator!= (const char *string) const;
^
cc-1020 CC: ERROR File = strngs.h, Line = 71
The identifier "STRING" is undefined.
STRING & operator= (const char *string);
^
cc-1315 CC: ERROR File = strngs.h, Line = 71
Function "operator=" must be a member function.
STRING & operator= (const char *string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 72
The identifier "STRING" is undefined.
STRING & operator= (const STRING & string);
^
cc-1315 CC: ERROR File = strngs.h, Line = 72
Function "operator=" must be a member function.
STRING & operator= (const STRING & string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 72
The identifier "STRING" is undefined.
STRING & operator= (const STRING & string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 74
The identifier "STRING" is undefined.
STRING operator+ (const STRING & string) const;
^
cc-1020 CC: ERROR File = strngs.h, Line = 74
The identifier "STRING" is undefined.
STRING operator+ (const STRING & string) const;
^
cc-1287 CC: ERROR File = strngs.h, Line = 74
A type qualifier on this function is not allowed.
STRING operator+ (const STRING & string) const;
^
cc-3378 CC: ERROR File = strngs.h, Line = 74
A nonmember operator requires a parameter with "class" or "enum" type.
STRING operator+ (const STRING & string) const;
^
cc-1020 CC: ERROR File = strngs.h, Line = 75
The identifier "STRING" is undefined.
STRING operator+ (const char ch) const;
^
cc-1287 CC: ERROR File = strngs.h, Line = 75
A type qualifier on this function is not allowed.
STRING operator+ (const char ch) const;
^
cc-3378 CC: ERROR File = strngs.h, Line = 75
A nonmember operator requires a parameter with "class" or "enum" type.
STRING operator+ (const char ch) const;
^
cc-1020 CC: ERROR File = strngs.h, Line = 77
The identifier "STRING" is undefined.
STRING & operator+= (const char *string);
^
cc-1319 CC: ERROR File = strngs.h, Line = 77
Too few parameters are specified for this operator function.
STRING & operator+= (const char *string);
^
cc-3378 CC: ERROR File = strngs.h, Line = 77
A nonmember operator requires a parameter with "class" or "enum" type.
STRING & operator+= (const char *string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 78
The identifier "STRING" is undefined.
STRING & operator+= (const STRING & string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 78
The identifier "STRING" is undefined.
STRING & operator+= (const STRING & string);
^
cc-1319 CC: ERROR File = strngs.h, Line = 78
Too few parameters are specified for this operator function.
STRING & operator+= (const STRING & string);
^
cc-3378 CC: ERROR File = strngs.h, Line = 78
A nonmember operator requires a parameter with "class" or "enum" type.
STRING & operator+= (const STRING & string);
^
cc-1020 CC: ERROR File = strngs.h, Line = 79
The identifier "STRING" is undefined.
STRING & operator+= (const char ch);
^
cc-1319 CC: ERROR File = strngs.h, Line = 79
Too few parameters are specified for this operator function.
STRING & operator+= (const char ch);
^
cc-3378 CC: ERROR File = strngs.h, Line = 79
A nonmember operator requires a parameter with "class" or "enum" type.
STRING & operator+= (const char ch);
^
cc-1020 CC: ERROR File = strngs.h, Line = 88
The identifier "ensure_cstr" is undefined.
inline void ensure(inT32 min_capacity) { ensure_cstr(min_capacity); }
^
cc-1166 CC: ERROR File = strngs.h, Line = 90
Expected a declaration.
private:
^
cc-1012 CC: WARNING File = strngs.h, Line = 107
Parsing restarts here after previous syntax error.
} STRING_HEADER;
^
cc-1020 CC: ERROR File = strngs.h, Line = 113
The identifier "STRING_HEADER" is undefined.
STRING_HEADER* data_;
^
cc-1020 CC: ERROR File = strngs.h, Line = 116
The identifier "STRING_HEADER" is undefined.
inline STRING_HEADER* GetHeader() {
^
cc-1020 CC: ERROR File = strngs.h, Line = 119
The identifier "STRING_HEADER" is undefined.
inline const STRING_HEADER* GetHeader() const {
^
cc-1287 CC: ERROR File = strngs.h, Line = 119
A type qualifier on this function is not allowed.
inline const STRING_HEADER* GetHeader() const {
^
cc-1285 CC: ERROR File = strngs.h, Line = 119
An overload function cannot be distinguished by the return type alone.
inline const STRING_HEADER* GetHeader() const {
^
cc-1020 CC: ERROR File = strngs.h, Line = 125
The identifier "STRING_HEADER" is undefined.
return ((char *)data_) + sizeof(STRING_HEADER);
^
cc-1287 CC: ERROR File = strngs.h, Line = 128
A type qualifier on this function is not allowed.
inline const char* GetCStr() const {
^
cc-1285 CC: ERROR File = strngs.h, Line = 128
An overload function cannot be distinguished by the return type alone.
inline const char* GetCStr() const {
^
cc-1020 CC: ERROR File = strngs.h, Line = 129
The identifier "STRING_HEADER" is undefined.
return ((const char *)data_) + sizeof(STRING_HEADER);
^
cc-1287 CC: ERROR File = strngs.h, Line = 131
A type qualifier on this function is not allowed.
inline bool InvariantOk() const {
^
cc-1287 CC: ERROR File = strngs.h, Line = 145
A type qualifier on this function is not allowed.
void FixHeader() const; // make used_ non-negative, even if const
^
cc-1166 CC: ERROR File = strngs.h, Line = 149
Expected a declaration.
};
^
cc-1020 CC: ERROR File = params.h, Line = 94
The identifier "STRING" is undefined.
STRING *value);
^
cc-1271 CC: ERROR File = params.h, Line = 164
An operator is expected at this point.
operator STRING &() { return value_; }
^
cc-1065 CC: ERROR File = params.h, Line = 164
A semicolon is expected at this point.
operator STRING &() { return value_; }
^
cc-1012 CC: WARNING File = params.h, Line = 169
Parsing restarts here after previous syntax error.
STRING value_;
^
cc-1020 CC: ERROR File = params.h, Line = 159
The identifier "value_" is undefined.
value_ = value;
^
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1166 CC: ERROR File = strngs.h, Line = 1
Expected a declaration.
/**********************************************************************
^
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1007 CC: ERROR File = strngs.h, Line = 1
The indicated token is not valid in this context.
/**********************************************************************
^
cc-1012 CC: WARNING File = unicharmap.h, Line = 48
Parsing restarts here after previous syntax error.
UNICHAR_ID unichar_to_id(const char* const unichar_repr, int length) const;
^
cc-1287 CC: ERROR File = unicharmap.h, Line = 52
A type qualifier on this function is not allowed.
bool contains(const char* const unichar_repr) const;
^
cc-1287 CC: ERROR File = unicharmap.h, Line = 57
A type qualifier on this function is not allowed.
bool contains(const char* const unichar_repr, int length) const;
^