Hi All,
I am trying to port one project from Solaris (CC) to gcc, which uses RWlibs (of Tools.h++ which comes along with the sunstudio package).
I am working on RHEL 5.4.
As a first step i am trying my hand with the following simple program:
#include <iostream>
#include <rw/cstring.h>
int main(){
RWCString a("TEST Program compiled successfully with gcc");
std::cout << a << std::endl;
return 0;
}
when i tried to compile the above sample program i got the following:
$ g++ -Wall -g rwstring.cc -I/app/sunstudio12/prod/include/CC/rw7
/app/sunstudio12/prod/include/CC/rw7/rw/generic.h:80: error: ISO C++ forbids declaration of ‘genericerror’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/rstream.h:46: error: expected initializer before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:378: error: ISO C++ forbids declaration of ‘istream’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:378: error: expected ‘;’ before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:379: error: ISO C++ forbids declaration of ‘istream’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:379: error: expected ‘;’ before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:381: error: ISO C++ forbids declaration of ‘istream’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:381: error: expected ‘;’ before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:382: error: ISO C++ forbids declaration of ‘istream’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:382: error: expected ‘;’ before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:383: error: ISO C++ forbids declaration of ‘istream’ with no type
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:383: error: expected ‘;’ before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:480: error: expected constructor, destructor, or type conversion before ‘&’ token
/app/sunstudio12/prod/include/CC/rw7/rw/cstring.h:481: error: expected constructor, destructor, or type conversion before ‘&’ token
Any help/suggestions is appreciated.
Thanks in advance,
14341