using g++ on Solaris9
gcc version 2.95.3 20010315 (release)
trying to include a header file, this is actually the header file for OTL version 4, and then I get a flood of error messages from including the header. I stripped the C++ program so it is just a bare bones main with a print and return. The program compiles fine without the header file, but as soon as the header file the following are some of the errors I get :
/usr/include/otlv4.h:6357: invalid use of `this' in non-member function
/usr/include/otlv4.h:6358: invalid use of `this' in non-member function
/usr/include/otlv4.h:6359: invalid use of `this' in non-member function
/usr/include/otlv4.h:6360: invalid use of `this' in non-member function
/usr/include/otlv4.h:6362: invalid use of `this' in non-member function
/usr/include/otlv4.h:6363: invalid use of `this' in non-member function
/usr/include/otlv4.h:6364: template argument 1 is invalid
/usr/include/otlv4.h:6364: template argument 2 is invalid
/usr/include/otlv4.h:6364: template argument 3 is invalid
/usr/include/otlv4.h:6364: template argument 4 is invalid
/usr/include/otlv4.h:6364: invalid use of `this' in non-member function
/usr/include/otlv4.h:6368: invalid use of `this' in non-member function
/usr/include/otlv4.h:6370: no matching function for call to `check_buf ()'
/usr/include/otlv4.h:6374: invalid use of `this' in non-member function
/usr/include/otlv4.h:6375: invalid use of `this' in non-member function
/usr/include/otlv4.h:6378: invalid use of `this' in non-member function
/usr/include/otlv4.h:6378: invalid use of `this' in non-member function
/usr/include/otlv4.h:6379: invalid use of `this' in non-member function
/usr/include/otlv4.h:6379: invalid use of `this' in non-member function
/usr/include/otlv4.h:6379: invalid use of `this' in non-member function
/usr/include/otlv4.h:6387: template argument 1 is invalid
/usr/include/otlv4.h:6387: template argument 2 is invalid
/usr/include/otlv4.h:6387: template argument 3 is invalid
/usr/include/otlv4.h:6389: invalid use of `this' in non-member function
/usr/include/otlv4.h:6392: invalid use of `this' in non-member function
/usr/include/otlv4.h: At top level:
/usr/include/otlv4.h:6397: parse error before `}'
/usr/include/otlv4.h:6404: template with C linkage
/usr/include/otlv4.h:6727: syntax error before `&'
/usr/include/otlv4.h:6732: ANSI C++ forbids initialization of member `null_fetch
ed'
/usr/include/otlv4.h:6732: making `null_fetched' static
/usr/include/otlv4.h:6732: ANSI C++ forbids in-class initialization of non-const
static member `null_fetched'
/usr/include/otlv4.h:6732: declaration of `int otl_tmpl_inout_stream<TExceptionS
truct,TConnectStruct,TCursorStruct,TVariableStruct ,TTimestampStruct>::null_fetch
ed'
/usr/include/otlv4.h:6415: conflicts with previous declaration `int otl_tmpl_ino
ut_stream<TExceptionStruct,TConnectStruct,TCursorS truct,TVariableStruct,TTimesta
mpStruct>::null_fetched'
/usr/include/otlv4.h: In method `otl_tmpl_inout_stream<TExceptionStruct,TConnect
Struct,TCursorStruct,TVariableStruct,TTimestampStr uct>:tl_tmpl_inout_stream(sh
ort int, const char *, otl_tmpl_connect<TExceptionStruct,TConnectStruct,T CursorS
truct> &, bool = false)':
/usr/include/otlv4.h:6439: non-template type `otl_tmpl_out_stream' used as a tem
plate
/usr/include/otlv4.h:6439: confused by earlier errors, bailing out
Any suggestions would be greatly appreciated.