Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error in compiling RW libs with g++

843935Mar 14 2011 — edited Apr 30 2012
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2012
Added on Mar 14 2011
5 comments
928 views