Link to home
Start Free TrialLog in
Avatar of carydb
carydb

asked on

converting program from Rogue Wave tools.h++ to STL (UNIX platform)

I have begun to convert a program from using Rogue Wave tools to STL.  My first step
is to change RWCString to string. I included the STL string header file (#include <string>) in my file.  Without making any other changes I immediately got compiler errors.  

"/opt/local/rogue/rw/rwtime.h", line 396: Error: operator<=(const RWTime&, const RWTime&) already had a body defined.
"/opt/local/rogue/rw/rwtime.h", line 396: Error: t1 is not defined.
"/opt/local/rogue/rw/rwtime.h", line 396: Error: t2 is not defined.
"/opt/local/rogue/rw/rwtime.h", line 396: Error: Badly formed expression.
"/opt/local/rogue/rw/rwtime.h", line 396: Error: Badly formed expression.
"/opt/local/rogue/rw/rwtime.h", line 400: Error: operator>=(const RWTime&, const RWTime&) already had a body defined.
"/opt/local/rogue/rw/rwtime.h", line 400: Error: t1 is not defined.
"/opt/local/rogue/rw/rwtime.h", line 400: Error: t2 is not defined.
"/opt/local/rogue/rw/rwtime.h", line 400: Error: Badly formed expression.
"/opt/local/rogue/rw/rwtime.h", line 400: Error: Badly formed expression.


My question is, How do I go about tracking down this problem?  All I did was add the preprocessor command  #include <string>

ASKER CERTIFIED SOLUTION
Avatar of oferh
oferh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of carydb
carydb

ASKER

I did as you suggested and it looked like it was compiling, but it failed the same way during complilation of a different file.

try the same in that file.
if it worked then it is "only" a question
of the order of include files.
Avatar of carydb

ASKER

I did that in each of the files (listed the stl include at the end of the include sections.)  It still fails.  The include files that I have include each other here and there. Could that be part of the problem?  The heaader files did not seem to care that #include </rw/cstring.h> is included in each of the header files.
Avatar of carydb

ASKER

I had to work in several files, but it finally worked.  Of coarse, there are new problems now.  Your answer did solve my problem in this question, so I will accept it as the answer.  Thanks much.