how to solve the ambiguous defination of Rouguewave istream

on Solaris nevada & Studio 11, I compile the following code

#include <rw/rwdate.h>

#include <rw/rstream.h>

int main(){

// ENIAC start date

RWDate d(14, "February", 1945);

// Today

RWDate today;

cout << d.asString("%A, %B %d 19%y")

<< " was the day the ENIAC computer was" << endl

<< "first turned on. "

<< today - d << " days have gone by since then. " << endl;

return 0;

}

the compilers says that :

"/export/home/opt/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.

"/export/home/opt/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The name istream is ambiguous, istream and std::istream.

"/export/home/opt/SUNWspro/prod/include/CC/rw7/rw/rstream.h", line 46: Error: The type "istream" is incomplete.

"/export/home/opt/SUNWspro/prod/include/CC/rw7/rw/cstring.h", line 347: Error: The name istream is ambiguous, istream and std::istream.

How can I solve it?

Thanks.

[1136 byte] By [jeff2050] at [2007-11-26 10:40:50]
# 1

I suspect your CC commad line is not correct.

When using RW Tools.h++, use one of these options:

-library=rwtools7_std

-library=rwtools7,iostream

The first options is for use with the default libCstd and standard iostreams.

The second option is for use with "classic" iosttreams.

We do not support use of strlport with RW Tools.h++.

If you not using the version of RW Tools.h++ supplied with the compiler, you will have to check with Rogue Wave for instructions on using the library with Sun C++.

clamage45 at 2007-7-7 2:52:21 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Yes. It works well when I use the second options. Thanks.
jeff2050 at 2007-7-7 2:52:21 > top of Java-index,Development Tools,Solaris and Linux Development Tools...